This is an automated email from the ASF dual-hosted git repository.

doebele pushed a commit to branch version3
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/version3 by this push:
     new 4784793  EMPIREDB-362 small fix
4784793 is described below

commit 4784793d539bd53e73e64de4acf5ff3357c0da7a
Author: Rainer Döbele <[email protected]>
AuthorDate: Mon Feb 7 22:12:22 2022 +0100

    EMPIREDB-362 small fix
---
 empire-db/src/main/java/org/apache/empire/db/DBRecord.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/empire-db/src/main/java/org/apache/empire/db/DBRecord.java 
b/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
index 135ff9c..20696de 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
@@ -635,6 +635,13 @@ public class DBRecord extends DBRecordData implements 
Record, Cloneable, Seriali
         return key;
     }
     
+    /**
+     * Returns the record id for tables which have a single numeric primary key
+     * This method is provided for convenience in additon to the the getKey() 
method
+     * @return the record id
+     * @throws NoPrimaryKeyException if the table has no primary key
+     * @throws NotSupportedException if the primary key is not a single column 
of if the column is not numeric
+     */
     public long getId()
     {
         // Check Columns
@@ -987,8 +994,6 @@ public class DBRecord extends DBRecordData implements 
Record, Cloneable, Seriali
             throw new ObjectNotValidException(this);
         if (!isModified())
             return; /* Not modified. Nothing to do! */
-        if (isReadOnly())
-            throw new RecordReadOnlyException(this);
         // check updatable
         checkUpdateable();
         // allow rollback

Reply via email to