[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    RE: Retrieve auto-incremeneted primary-key?
From:       "McCaffrey, John G." <John.McCaffrey () kraft ! com>
Date:       2004-04-29 16:43:18
Message-ID: 4EC8E655CE8E014BB1B17EDB3944445B07B304C5 () usknausglvxmb06
[Download RAW message or body]

The object should be updated with its PK after the insert. Try the get
method for that value.

if it is a DB Identity column (and the Get isn't working) you may have to
use a sequenceManager. (If so, look at the sequenceManaging threads, or
Identity threads. It has been well discussed)

HTH


-----Original Message-----
From: Mindy Pereira [mailto:Mindy.Pereira@appiancorp.com]
Sent: Thursday, April 29, 2004 10:21 AM
To: OJB Users List
Subject: Retrieve auto-incremeneted primary-key? 


Is there a way to retrieve the id of an object with an autoincremented
primary key that was just inserted using the broker.store() method?

Thanks.

---------------------------------------------------------------------
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic