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

          People

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

            Dates

            • Created:
              Updated:

              Development