OpenJPA
  1. OpenJPA
  2. OPENJPA-101

enhance JPQL Constructor Expressions implementation

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: query
    • Labels:
      None

      Description

      There are two tables A and B, I need to execute sql like
      "insert into A select ... from B".
      I use JPQL Constructor Expressions,
      select new A(...) from B, got A list then persist.
      But some fields of A depends on program context, not direct from B, so SELECT NEW clause should look like these :
      select new A(B.column1, 'xxx') from B, or
      select new A(null, B.column2) from B, or
      select new A(variable, B.column2) from B.

      Unfortunately, OpenJPA doesn't support this.
      I have to get the result object[] list and constuct A in my code now.

      If JPQL Constructor Expressions become more powerful, my code will be more simple then.

        Activity

        wanyna created issue -
        Patrick Linskey made changes -
        Field Original Value New Value
        Fix Version/s 1.1.0 [ 12312344 ]
        Hide
        Patrick Linskey added a comment -

        Sounds like a cool enhancement. I think that it would be nice to implement with both literals and parameters. However, I think it's out of scope of 1.1.0.

        Show
        Patrick Linskey added a comment - Sounds like a cool enhancement. I think that it would be nice to implement with both literals and parameters. However, I think it's out of scope of 1.1.0.
        Patrick Linskey made changes -
        Fix Version/s 1.1.0 [ 12312344 ]
        Fix Version/s 1.2.0 [ 12313102 ]
        Hide
        Michael Dick added a comment -

        Moving to next release

        Show
        Michael Dick added a comment - Moving to next release
        Michael Dick made changes -
        Fix Version/s 1.3.0 [ 12313326 ]
        Fix Version/s 1.2.0 [ 12313102 ]
        Donald Woods made changes -
        Fix Version/s 1.3.0 [ 12313326 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            wanyna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development