[prev in list] [next in list] [prev in thread] [next in thread]
List: ojb-dev
Subject: svn commit: r432583 -
From: arminw () apache ! org
Date: 2006-08-18 13:43:46
Message-ID: 20060818134346.C4F221A981D () eris ! apache ! org
[Download RAW message or body]
Author: arminw
Date: Fri Aug 18 06:43:45 2006
New Revision: 432583
URL: http://svn.apache.org/viewvc?rev=432583&view=rev
Log:
fix, always replace the Identity object on insert
Modified:
db/ojb/trunk/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java?rev=432583&r1=432582&r2=432583&view=diff
==============================================================================
--- db/ojb/trunk/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java \
(original)
+++ db/ojb/trunk/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java Fri \
Aug 18 06:43:45 2006 @@ -2406,11 +2406,12 @@
if (insert)
{
dbAccess.executeInsert(cld, obj);
- if(oid.isTransient())
- {
- // Create a new Identity based on the current set of primary key \
values.
- oid = serviceIdentity().buildIdentity(cld, obj);
- }
+ /*
+ Create a new Identity based on the current set of primary key values.
+ This is mandatory because the used oid can be transient or the specified
+ PK values of the object can be changed by the database (use of database \
identity columns) + */
+ oid = serviceIdentity().buildIdentity(cld, obj);
}
// else use UPDATE
else
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic