Hi,
I'm having a hard time narrowing down an issue that only became apparent with in the UI. The issue is that, I'm getting repeated results of the owning entity of an '@ElementCollection'. The entity returned is repeated for every element in the collection. Switching back to EclipseLink (with the same code) yields the correct answer (that is, no duplication). I can't quite narrow down the condition under which it happens, but I have supplied a test below that shows what I'm trying to figure out. I'm not saying that there is a bug - I'm just confused about the outcome. Could be that I'm being confused about JPA2 criteria again.
Here is the example output, with a new DB (empty db):
testFindByLikeLowerWildcardWithoutBranchWithOr: SELECT $1 FROM Company $1 WHERE ((LOWER($1.name) LIKE :p1) AND (($1.conditionOne=:p2))) Got: 1 results - correct
testFindByLikeLowerWildcardWithBranchWithOr: SELECT $1 FROM Company $1 WHERE ((LOWER($1.name) LIKE :p1) AND ((($1.branches.branch=:p2) OR ($1.conditionOne=:p3)))) Only expected one result, but got: 2
Again, this is only an engineered test to show the problem on the real application. As can be seen from the output, only an extra 'or' condition is given - yet even though the binded value evaluates to a 'false' condition, and extra entity is returned.
Any help is appreciated!
ObjectDB Version: 2.2.8_06