Difference between revisions of "EclipseLink/DesignDocs/367452"

From Eclipsepedia

Jump to: navigation, search
(New page: <div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div> = Design Specification: JPQL join with ON clause = [http://bugs.eclipse.org/367452 ER 367452] == Do...)
 
(Work Required)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div>
= Design Specification: JPQL join with ON clause =
+
= Design Specification: Join with ON clause =
  
 
[http://bugs.eclipse.org/367452 ER 367452]
 
[http://bugs.eclipse.org/367452 ER 367452]
Line 11: Line 11:
 
! Version Description & Notes
 
! Version Description & Notes
 
|-  
 
|-  
| 122 December 2011
+
| 22 December 2011
 
| Gordon Yorke
 
| Gordon Yorke
 
| Initial Document created
 
| Initial Document created
Line 18: Line 18:
 
== Project overview ==
 
== Project overview ==
  
Overview of the project/featureWhy is it desired, what are its goals.
+
JPA 2.1 will add support for an ON clause within the JOIN clause of a Java Persistence QuerySupport will be required for both JPQL and Criteria queries.
 
+
Goals:
+
* goal 1
+
* goal 2
+
  
 
== Concepts ==
 
== Concepts ==
  
Present any concepts relevant to the feature.
+
Generally the only condition for a JOIN is that of the Foreign Key but the ON clause is intended to allow users to specify additional conditions for the JOIN.
 +
 
 +
eg:
 +
JPQL:
 +
SELECT s.name FROM Suppliers s LEFT JOIN s.products p ON p.status = 'inStock'
 +
 
 +
SQL:
 +
SELECT s.name FROM Suppliers s LEFT JOIN Products p ON s.id = p.supplierId AND p.status = 'inStock'
  
 
== Requirements ==
 
== Requirements ==
  
The following sections will expand the goals of this project into more concrete requirements.
+
Support the ON clause syntax of JPQL and the Criteria APIs
  
 
== Design Constraints ==
 
== Design Constraints ==
Line 45: Line 48:
  
 
== Documentation ==
 
== Documentation ==
 +
 +
==Work Required==
 +
# ON support in expression framework and JPQL
 +
#: Completed
 +
# ON support in Criteria API
 +
#: approx 3 days
 +
# Testing
 +
#: approx 3 days
  
 
== Open Issues ==
 
== Open Issues ==

Latest revision as of 10:53, 10 September 2012

[edit] Design Specification: Join with ON clause

ER 367452

[edit] Document History

Date Author Version Description & Notes
22 December 2011 Gordon Yorke Initial Document created

[edit] Project overview

JPA 2.1 will add support for an ON clause within the JOIN clause of a Java Persistence Query. Support will be required for both JPQL and Criteria queries.

[edit] Concepts

Generally the only condition for a JOIN is that of the Foreign Key but the ON clause is intended to allow users to specify additional conditions for the JOIN.

eg: JPQL: SELECT s.name FROM Suppliers s LEFT JOIN s.products p ON p.status = 'inStock'

SQL: SELECT s.name FROM Suppliers s LEFT JOIN Products p ON s.id = p.supplierId AND p.status = 'inStock'

[edit] Requirements

Support the ON clause syntax of JPQL and the Criteria APIs

[edit] Design Constraints

[edit] Design / Functionality

[edit] Testing

[edit] API

[edit] GUI

[edit] Config files

[edit] Documentation

[edit] Work Required

  1. ON support in expression framework and JPQL
    Completed
  2. ON support in Criteria API
    approx 3 days
  3. Testing
    approx 3 days

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