Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Credit to @luiseufrasio
Malformed SQL when using SecondaryTable & PrimaryKeyJoinColumn annotations
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.8.payara-p3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=T0.HCSO#, DRIVER=4.32.28 Error Code: -206 Call: SELECT t0.HDSO#, t1.HCSO#, t0.HDCUST, t0.HDYEAR, t0.HDRLSO, t1.HCUSER FROM SOHDS0 t0, SOHC t1 WHERE ((t0.HDSO# = ?) AND (t0.HCSO# = t0.HDSO#)) bind => [123] Query: ReadObjectQuery(name="readSalesOrder" referenceClass=FleetSalesOrder sql="SELECT t0.HDSO#, t1.HCSO#, t0.HDCUST, t0.HDYEAR, t0.HDRLSO, t1.HCUSER FROM SOHDS0 t0, SOHC t1 WHERE ((t0.HDSO# = ?) AND (t0.HCSO# = t0.HDSO#))")
The AND clause at the very end should have condition t1.HCSO# = t0.HDSO#