You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Durham David Contr 805 CSPTS/SCBE <Da...@scott.af.mil> on 2003/09/26 16:49:02 UTC
storing a new object fails
I'm writing a routine that clears out a db and reloads a defined test
data set. I'm trying to insert new objects but sometimes, not always,
OJB will execute an update statement instead of an insert. I'm
explicitly setting the id pk's and bypassing the sequencemanager, so I
figure that has something to do with it, but I can't explain the
discrepancy. Can anyone point me to the likely cause of this?
Thanks,
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: storing a new object fails
Posted by Jin Bal <ji...@hotmail.com>.
try leaving the PK empty - I thnk that OJB works out whether its a insert or
update by the presence of this field
There may be a way to force an insert but I can't remember it right now
Jin
----- Original Message -----
From: "Durham David Contr 805 CSPTS/SCBE" <Da...@scott.af.mil>
To: <oj...@db.apache.org>
Sent: Friday, September 26, 2003 3:49 PM
Subject: storing a new object fails
I'm writing a routine that clears out a db and reloads a defined test
data set. I'm trying to insert new objects but sometimes, not always,
OJB will execute an update statement instead of an insert. I'm
explicitly setting the id pk's and bypassing the sequencemanager, so I
figure that has something to do with it, but I can't explain the
discrepancy. Can anyone point me to the likely cause of this?
Thanks,
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org