empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1379384 - /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
Date Fri, 31 Aug 2012 09:36:41 GMT
Author: doebele
Date: Fri Aug 31 09:36:41 2012
New Revision: 1379384

URL: http://svn.apache.org/viewvc?rev=1379384&view=rev
Log:
EMPIREDB-157
add check for key column in DBRecord.isFieldReadOnly()

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java?rev=1379384&r1=1379383&r2=1379384&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java Fri Aug 31
09:36:41 2012
@@ -657,6 +657,9 @@ public class DBRecord extends DBRecordDa
             throw new ObjectNotValidException(this);
     	if (rowset.getColumnIndex(column)<0)
             throw new InvalidArgumentException("column", column);
+    	// Check key column 
+        if (isValid() && !isNew() && rowset.isKeyColumn((DBColumn)column))
+        	return true;
         // Ask RowSet
         return (rowset.isColumnReadOnly((DBColumn)column));
     }



Mime
View raw message