| Summary: | Comparing object using is not null results in an Exception | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Vikram Bhatia <vikram.jeet.bhatia> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | david.minsky, vikram.jeet.bhatia | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
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 |
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.