eclipse-ee4j / eclipselink

Eclipselink project
https://eclipse.dev/eclipselink/
Other
197 stars 167 forks source link

JPQL SELECT query returns incorrect results when running back to back on DB2 #2243

Open ajaypaul-ibm opened 3 weeks ago

ajaypaul-ibm commented 3 weeks ago

EclipseLink is returning an empty result list intermittently when running on DB2.

For example, the JPQL Query: SELECT this.numFullTimeWorkers FROM DemographicInfo WHERE this.collectedOn=:when

When executed on DB2 this query will have one of the two behaviors:

  1. The first time the query is executed an empty result list will be returned, all subsequent executions of this query will return the correct result
    1. The first time the query is executed the correct result will be returned, all subsequent executions of this query will return an empty result list.
lukasj commented 3 weeks ago

DB2 specific support: https://github.com/eclipse-ee4j/eclipselink/blob/master/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java