db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r464908 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java
Date Tue, 17 Oct 2006 11:50:00 GMT
Author: arminw
Date: Tue Oct 17 04:49:59 2006
New Revision: 464908

URL: http://svn.apache.org/viewvc?view=rev&rev=464908
Log:
ask for ClassDescriptor autoincrement fields

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java?view=diff&rev=464908&r1=464907&r2=464908
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/sequence/PerFieldManager.java
Tue Oct 17 04:49:59 2006
@@ -84,18 +84,15 @@
 
     public void afterStore(JdbcAccess dbAccess, ClassDescriptor cld, Object obj) throws SequenceManagerException
     {
-        FieldDescriptor[] pks = cld.getFieldDescriptor(false);
+        FieldDescriptor[] pks = cld.getAutoIncrementFields();
         FieldDescriptor result;
         for(int i = 0; i < pks.length; i++)
         {
             result = pks[i];
-            if(result.isAutoIncrement())
+            SequenceManager sm = lookup(result);
+            if(sm != null)
             {
-                SequenceManager sm = lookup(result);
-                if(sm != null)
-                {
-                    sm.afterStore(dbAccess, cld, obj);
-                }
+                sm.afterStore(dbAccess, cld, obj);
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message