A vendor extension now available in DataNucleus v5 is for JPQL’s ability to JOIN to other entities. In standard JPQL you can only add a JOIN through a relation. For example
SELECT p FROM Person p JOIN p.address a WHERE a.street = 'Main Street'
In this example we have a candidate “root” entity of Person, and are joining to the Address entity via the “address” relation field in Person.
The vendor extension provides the ability to join to a new “root” entity. For example
SELECT p FROM Person p LEFT OUTER JOIN Address a ON p.addressName = a.name
In this example we have a candidate “root” entity of Person, and we are joining to the Address entity using a manually specified ON clause. That is, there doesn’t need to be a relation between Person and Address to make this join, just a condition that we are imposing in the ON clause.
This is not part of the JPA 2.1 spec, but may be in a future JPA spec, but you can make use of it in DataNucleus v5+.