Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
Description
Most of the tests under org.apache.openjpa.persistence.jdbc.maps behave random when they test against a real database.
Those tests capture the JQPL path navigation for Maps (Covered in the spec in 4.4.4.1).
public class @Entity Division { private Map<Division, VicePresident> orga; }
Such structures can be navitated via KEY(), VALUE(), and ENTRY().
Our tests did create 2 Divisions with 2 orga entries. And using query.getResultList().get(0) to verify the results. And this was exactly the problem. using get(0) leads to random behaviour with real databases. On the default Derby database it didn't make any difference as the result from the index query was always in the order in which the data got written to disk. But this is not guaranteed for performance tuned databases like PostgreSQL, MariaDB and MySQL. In those cases we got random errors.