[prev in list] [next in list] [prev in thread] [next in thread]
List: ojb-dev
Subject: svn commit: r432603 -
From: arminw () apache ! org
Date: 2006-08-18 14:31:43
Message-ID: 20060818143143.A87C61A981A () eris ! apache ! org
[Download RAW message or body]
Author: arminw
Date: Fri Aug 18 07:31:42 2006
New Revision: 432603
URL: http://svn.apache.org/viewvc?rev=432603&view=rev
Log:
fix, on object insert always replace the current Identity object with new one
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ \
ojb/broker/core/PersistenceBrokerImpl.java?rev=432603&r1=432602&r2=432603&view=diff \
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java \
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java \
Fri Aug 18 07:31:42 2006 @@ -2019,11 +2019,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