Only the relationship join is put in the ON clause in Criteria or JPQL, there is no way to affect the ON clause.
Why do you need the comparison in the ON clause? Use a left join for the path as well to ensure it is outer joined, what is the full query?
Try to re-word it to not require the ON clause.
It is possible in EclipseLink to define a OneToOneQuery key that allows a custom ON clause.
Only the relationship join is put in the ON clause in Criteria or JPQL, there is no way to affect the ON clause.
Why do you need the comparison in the ON clause? Use a left join for the path as well to ensure it is outer joined, what is the full query?
Try to re-word it to not require the ON clause.
It is possible in EclipseLink to define a OneToOneQuery key that allows a custom ON clause.