mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-8276 - Integrate LoadPlans into UniqueEntityLoader (PoC)
This commit is contained in:
parent
803c73c555
commit
d6ac5359a7
@ -416,6 +416,11 @@ public void finishingAttribute(AttributeDefinition attributeDefinition) {
|
||||
|
||||
private Map<AssociationKey,FetchOwner> fetchedAssociationKeyOwnerMap = new HashMap<AssociationKey, FetchOwner>();
|
||||
|
||||
@Override
|
||||
public boolean isDuplicateAssociationKey(AssociationKey associationKey) {
|
||||
return fetchedAssociationKeyOwnerMap.containsKey( associationKey );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void associationKeyRegistered(AssociationKey associationKey) {
|
||||
// todo : use this information to maintain a map of AssociationKey->FetchOwner mappings (associationKey + current fetchOwner stack entry)
|
||||
|
@ -553,6 +553,11 @@ public void finishingAttribute(AttributeDefinition attributeDefinition) {
|
||||
|
||||
private Map<AssociationKey,FetchSource> fetchedAssociationKeySourceMap = new HashMap<AssociationKey, FetchSource>();
|
||||
|
||||
@Override
|
||||
public boolean isDuplicateAssociationKey(AssociationKey associationKey) {
|
||||
return fetchedAssociationKeySourceMap.containsKey( associationKey );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void associationKeyRegistered(AssociationKey associationKey) {
|
||||
// todo : use this information to maintain a map of AssociationKey->FetchSource mappings (associationKey + current FetchSource stack entry)
|
||||
|
@ -170,4 +170,6 @@ public interface AssociationVisitationStrategy {
|
||||
public void associationKeyRegistered(AssociationKey associationKey);
|
||||
public FetchSource registeredFetchSource(AssociationKey associationKey);
|
||||
public void foundCircularAssociation(AssociationAttributeDefinition attributeDefinition);
|
||||
public boolean isDuplicateAssociationKey(AssociationKey associationKey);
|
||||
|
||||
}
|
||||
|
@ -291,6 +291,6 @@ protected void addAssociationKey(AssociationKey associationKey) {
|
||||
* false, otherwise.
|
||||
*/
|
||||
protected boolean isDuplicateAssociationKey(AssociationKey associationKey) {
|
||||
return visitedAssociationKeys.contains( associationKey );
|
||||
return visitedAssociationKeys.contains( associationKey ) || strategy.isDuplicateAssociationKey( associationKey );
|
||||
}
|
||||
}
|
||||
|
@ -263,4 +263,9 @@ public void foundCircularAssociation(
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDuplicateAssociationKey(AssociationKey associationKey) {
|
||||
return false; //To change body of implemented methods use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user