CascadeEntityJoinWalker.isTooManyCollections() depends on the current state of JoinWalker.associations to decide if the association should be added. This causes a behavior depending on the order of the result of persister.getSubclassPropertyType() in JoinWalker.walkEntityTree() (in effect, only the first eligible association will be added.) Unfortunately, the order of the result of persister.getSubclassPropertyType() can be random (is not defined) in the scan process (MetadataBuildingProcess.prepare() and ScanningCoordinator.coordinateScan().) |