openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wanyna (JIRA)" <>
Subject [jira] Created: (OPENJPA-101) enhance JPQL Constructor Expressions implementation
Date Thu, 11 Jan 2007 03:02:27 GMT
enhance JPQL Constructor Expressions implementation

                 Key: OPENJPA-101
             Project: OpenJPA
          Issue Type: Improvement
          Components: query
            Reporter: wanyna

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. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message