openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r1226910 - in /openjpa/trunk/openjpa-persistence/src/main: java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java resources/org/apache/openjpa/persistence/localizer.properties
Date Tue, 03 Jan 2012 18:46:09 GMT
Author: dwoods
Date: Tue Jan  3 18:46:08 2012
New Revision: 1226910

URL: http://svn.apache.org/viewvc?rev=1226910&view=rev
Log:
OPENJPA-2083 Unmapped fields silently treated as transient.  Patch provided by Jacob Nowosatka.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
    openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java?rev=1226910&r1=1226909&r2=1226910&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
Tue Jan  3 18:46:08 2012
@@ -628,10 +628,15 @@ public class PersistenceMetaDataDefaults
         }
 
         PersistenceStrategy strat = getPersistenceStrategy(null, member, ignoreTransient);
-        if (strat == null || strat == PersistenceStrategy.TRANSIENT)
+        if (strat == null) {
+            warn(meta, _loc.get("no-pers-strat", name));
             return false;
-        return true;
-	}
+        } else if (strat == PersistenceStrategy.TRANSIENT) {
+            return false;
+        } else {
+            return true;
+        }
+    }
 
     private boolean isAnnotatedTransient(Member member) {
         return member instanceof AnnotatedElement

Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties?rev=1226910&r1=1226909&r2=1226910&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
Tue Jan  3 18:46:08 2012
@@ -63,8 +63,10 @@ unsupported: OpenJPA does not yet suppor
 bad-meta-anno: The type of field "{0}" isn''t supported by declared \
 	persistence strategy "{1}".  Please choose a different strategy.
 no-pers-strat: Fields "{0}" are not a default persistent type, and do not \
-	have any annotations indicating their persistence strategy.  If you do \
-	not want these fields to be persisted, annotate them with @Transient.
+	have any annotations indicating their persistence strategy. They will \
+	be treated as non-persistent. If you intended for these fields to be \
+	persistent, be sure to annotate them appropriately. Otherwise annotate \
+	them with @Transient.
 generator-bad-strategy: "{0}" declares generator name "{1}", but uses the AUTO \
 	generation type.  The only valid generator names under AUTO are "uuid-hex" \
 	and "uuid-string".



Mime
View raw message