Closed dazey3 closed 2 years ago
This looks like a good candidate for a community/end-user contribution. I would suggest marking it with "good first issue" and/or "help wanted". That will help facilitate recruiting people to contribute. I would honestly also mark this low priority.
Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker
Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.
Section 4.4.4 defines two queries that it states are "equivalent":
The spec doesn't specifically define the Employee, ContactInfo, Address, and Phone classes for these queries. There are defined classes in other places of the JPA spec for Employee, ContactInfo, & Address but not for Phone. However, those defined Employee, ContactInfo, & Address classes do not match the attributes defined in these queries. I don't think the first sentence, which briefly describes the ContactInfo embeddable and the Phone entity, is adequate
For example, Section 11.1.2
AssociationOverride Annotation
defines a ContactInfo class:The section 4.4.4 example specifies the attribute name for ContactInfo should be
contactInfo.phones
, notcontactInfo.phoneNumbers
. Which one is right? Are they the same class even?Another example is that section 11.1.4 defines an Address class (as well as many other Address class definitions across the specification) :
This seems to match what section 4.4.4 is describing, but doesn't work with the section 11.1.2 definition of ContactInfo, which has a Unidirectional ManyToOne relationship to an Address class.
I think the best solution would be to define Employee, ContactInfo, Address, and Phone classes for section 4.4.4. I think the following definitions are accurate for the example and BNF: