>> But now.. just how do I update that bean to have that Id after insert?
Have your DAO return the (updated) bean and you shall see it has the new Id already set. -- Mike Ahlers Hippo Webworks Oosteinde 9 1017 WT Amsterdam The Netherlands Tel +31 (0)20 5224466 Fax +31 (0)20 5224467 --------------------------------------- [EMAIL PROTECTED] / www.hippo.nl --------------------------------------- -----Original Message----- From: Joose Vettenranta [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 5:02 PM To: [EMAIL PROTECTED] Subject: Re: OJB + postgresql + "autoincrement" And finding solution again.. Solution was to put that id field as read-only. But now.. just how do I update that bean to have that Id after insert? - Joose 20.7.2004 kello 17:50, Joose Vettenranta kirjoitti: Hi, > > now that I got working the receiving point and inserting sort works.. > but how do I use autoincrement thing in postgres? (using cocoon in > connection pooling). > > inserting when id is not set, inserts 0 as id. which of course causes > error. > > I tried to look that ojb example from wiki, but it didn't use cocoon > connection pool. Example file in cocoon source didn't have any > autoincrement in it. > > Postgresql table is like this: > create table category ( id serial, parent integer ); > > Thanks, Joose > > -- > "Always remember that you are unique, just like everyone else!" > * http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 * > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Always remember that you are unique, just like everyone else!" * http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
