Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< EclipseLink‎ | DesignDocs
Revision as of 09:16, 10 September 2012 by Unnamed Poltroon (Talk) (Document History)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Design Specification: ConstructorResult support in SQLResultSetMappings

ER 350727

Document History

Date Author Version Description & Notes
08 November 2011 Gordon Yorke Initial document creation
04 September 2012 Guy Peletier Feature competed

Project overview

The JPA specification is adding support for returning new Object instances from native query results. Know as "constructor" queries JPQL has supported returning Objects built with query results but until now the SQLResultSetMappings had no support for Constructor results and only Managed objects or primitive results could be returned from a native SQL query.


A constructor query takes the results of a query and calls a Constructor designated in the syntax of the JPQL SELECT clause with the designated arguments returning the newly build objects as the query result. For example : SELECT new ObjectA(e.firstName) FROM Employee e.

SQLResultSetMappings for the metadata for mapping the result of a native SQL query to a Managed object of the persistence unit. With the addition of the ConstructorResult element the SQLResultSetMapping now supports mapping native SQL results to non-managed objects.


Support the ConstructorResult element within the SQLResultSetMapping.

Design Constraints

Design / Functionality




Config files


Open Issues

This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes


This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.

Issue # Description / Notes Decision

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.

Back to the top