openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r724510 - /openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
Date Mon, 08 Dec 2008 22:13:00 GMT
Author: ssegu
Date: Mon Dec  8 14:13:00 2008
New Revision: 724510

URL: http://svn.apache.org/viewvc?rev=724510&view=rev
Log:
OPENJPA-485 - Saving NPE

Modified:
    openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java

Modified: openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
URL: http://svn.apache.org/viewvc/openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java?rev=724510&r1=724509&r2=724510&view=diff
==============================================================================
--- openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
(original)
+++ openjpa/branches/0.9.7-r547073/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
Mon Dec  8 14:13:00 2008
@@ -414,8 +414,10 @@
 
                     for (; from != null && from != to;
                         from = from.getJoinablePCSuperclassMapping()) {
-                    	pstate.field = from.getFieldMapping(pstate.field
-                    	    .getName());
+                        FieldMapping cast = from.getFieldMapping(pstate.field
+                                         .getName());
+                        if (cast != null)
+                            pstate.field = cast;
                         pstate.joins = from.joinSuperclass(pstate.joins, false);
                     }
                 }



Mime
View raw message