openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Created: (OPENJPA-1225) Improve query result processing with composite pattern
Date Tue, 04 Aug 2009 22:06:14 GMT
Improve query result processing with composite pattern

                 Key: OPENJPA-1225
             Project: OpenJPA
          Issue Type: New Feature
            Reporter: Pinaki Poddar

Query result data are packed into user-visible forms by a ResultPacker.
The logic of data packing is limited to certain extent.
This limitation is obvious if the query projection contains multiple constructor terms e.g.
    "select new foo(, p.age), Bar(p.age, from PObject p"

The limitation is further highlighted with new (and rather hairy) specification on result
processing in JPA 2.0 via introduction of several methods related to selection of projection
terms namely select(), multiselect(), array(), tuple(), constructor(). In fact, JavaDoc for
CriteriaQuery.multiselect() is a fine example of an API design following 'design-by-committee'

Data packing result need to improve. The solution is made difficult because 
a) it is risky to change the input data structures (the projection terms, aliases held by
QueryExpressions) as they will have wide impact on query formation. 
b) this new data packing should not impact the JPQL based queries or their result processing.
c) ResultPacker is an implementation not an interface.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message