Difference between revisions of "EclipseLink/DesignDocs/350727"

From Eclipsepedia

Jump to: navigation, search
(Document History)
Line 14: Line 14:
| Gordon Yorke
| Gordon Yorke
| Initial document creation
| Initial document creation
| 04 September 2012
| Guy Peletier
| Feature competed

Latest revision as of 09:16, 10 September 2012

[edit] Design Specification: ConstructorResult support in SQLResultSetMappings

ER 350727

[edit] Document History

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

[edit] 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.

[edit] Concepts

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.

[edit] Requirements

Support the ConstructorResult element within the SQLResultSetMapping.

[edit] Design Constraints

[edit] Design / Functionality

[edit] Testing

[edit] API

[edit] GUI

[edit] Config files

[edit] Documentation

[edit] 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

[edit] Decisions

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

[edit] 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.