Community
Participate
Working Groups
Build Identifier: 1.2.0 Employee has OneToOneMapping to ParkingSpace with the table EMPLOYEE having the foreign key "PSPACE_ID" to table PARKING_SPACE (PD="ID) Query query = em.createQuery("SELECT s FROM ParkingSpace s where s.id in (1001, 3001) and s.employee is not null"); It throws an Exception. org.eclipse.persistence.exceptions.QueryException Exception Description: Object comparison to NULL cannot be used for target foreign key relationships. Query on the source primary key instead. Expression: [ Base examples.model.ParkingSpace] Mapping: [org.eclipse.persistence.mappings.OneToOneMapping[employee]] Reproducible: Always Steps to Reproduce: Apply patch enclosed with only test changes to class JUnitJPQLUnitTestSuite. Run the test case which will fail with the underlying exception.
Created attachment 184046 [details] Proposed Fix
Fixed in trunk (2.2) revision: 8588
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink