mirror of https://github.com/apache/openjpa.git
Check for field inclusion in fetch group based on names of both decalring and defining class as owner.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@688777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d435a69c6b
commit
00c27c654a
|
@ -574,14 +574,14 @@ public class FetchConfigurationImpl
|
|||
clone._fromField = fm.getFullName(false);
|
||||
clone._fromType = type;
|
||||
clone._availableRecursion = getAvailableRecursionDepth(fm, type, true);
|
||||
if (StringUtils.equals(_directRelationOwner, fm.getFullName()))
|
||||
if (StringUtils.equals(_directRelationOwner, fm.getFullName(false)))
|
||||
clone._load = false;
|
||||
else
|
||||
clone._load = _load;
|
||||
|
||||
FieldMetaData owner = fm.getMappedByMetaData();
|
||||
if (owner != null && owner.getTypeCode() == JavaTypes.PC)
|
||||
clone._directRelationOwner = owner.getFullName();
|
||||
clone._directRelationOwner = owner.getFullName(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@ -593,7 +593,8 @@ public class FetchConfigurationImpl
|
|||
if (hasFetchGroupAll()
|
||||
|| (fmd.isInDefaultFetchGroup()
|
||||
&& hasFetchGroupDefault())
|
||||
|| hasField(fmd.getFullName(false)))
|
||||
|| hasField(fmd.getFullName(false))
|
||||
|| hasField(fmd.getRealName()))
|
||||
return true;
|
||||
String[] fgs = fmd.getCustomFetchGroups();
|
||||
for (int i = 0; i < fgs.length; i++)
|
||||
|
|
|
@ -349,6 +349,13 @@ public class FieldMetaData
|
|||
return (embedOwner) ? _embedFullName : _fullName;
|
||||
}
|
||||
|
||||
/**
|
||||
* The field name, qualified by the defining class.
|
||||
*/
|
||||
public String getRealName() {
|
||||
return getDefiningMetaData().getDescribedType().getName() + "." + _name;
|
||||
}
|
||||
|
||||
/**
|
||||
* MetaData about the field value.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue