openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r919502 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java
Date Fri, 05 Mar 2010 17:06:29 GMT
Author: ppoddar
Date: Fri Mar  5 17:06:29 2010
New Revision: 919502

URL: http://svn.apache.org/viewvc?rev=919502&view=rev
Log:
Categorize one-to-one correctly

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java?rev=919502&r1=919501&r2=919502&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/Members.java
Fri Mar  5 17:06:29 2010
@@ -19,6 +19,7 @@
 
 package org.apache.openjpa.persistence.meta;
 
+import java.util.Collection;
 import java.util.Set;
 
 import javax.persistence.metamodel.Attribute;
@@ -199,7 +200,7 @@
         public final PersistentAttributeType getPersistentAttributeType() {
             if (!fmd.isDeclaredTypePC())
                 return super.getPersistentAttributeType();
-            return fmd.getMappedByMetaData() == null 
+            return fmd.getMappedByMetaData() == null || !fmd.getType().isAssignableFrom(Collection.class)
                  ? PersistentAttributeType.ONE_TO_ONE
                  : PersistentAttributeType.ONE_TO_MANY;
         }



Mime
View raw message