openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r688777 - in /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa: kernel/FetchConfigurationImpl.java meta/FieldMetaData.java
Date Mon, 25 Aug 2008 16:57:06 GMT
Author: ppoddar
Date: Mon Aug 25 09:57:06 2008
New Revision: 688777

URL: http://svn.apache.org/viewvc?rev=688777&view=rev
Log:
Check for field inclusion in fetch group based on names of both decalring and defining class
as owner.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java?rev=688777&r1=688776&r2=688777&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
Mon Aug 25 09:57:06 2008
@@ -574,14 +574,14 @@
         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 @@
         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++)

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java?rev=688777&r1=688776&r2=688777&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
Mon Aug 25 09:57:06 2008
@@ -350,6 +350,13 @@
     }
 
     /**
+     * The field name, qualified by the defining class.
+     */
+    public String getRealName() {
+        return getDefiningMetaData().getDescribedType().getName() + "." + _name;
+    }
+
+    /**
      * MetaData about the field value.
      */
     public ValueMetaData getValue() {



Mime
View raw message