Affects Version/s: 2.4.1
Fix Version/s: None
MultiValuedTrasveralAttempt not evaluated when there is another field with the same name in the path.
1. Create a client entity as:
2. and a Product:
3. Run this query:
SELECT DISTINCT c
FROM Client c JOIN FETCH c.products
WHERE c.products.deleted = false
Result is: "JPQL does not allow traversal through multi-valued relation path. Try join instead"
4. Add a deleted field to the client:
5. Run the query again
Same exception when client have a deleted field
org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.traversePath is finding the wrong deleted field in the c.products path (the client.delete) and isMultiValuedTraversalAttempt is never evaluated