You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ivan Pilis <iv...@pxpgroup.com> on 2002/08/21 12:20:10 UTC

ID

hi!
i am inserting row into db (mysql) using turbine om object autogenerated at ant init (for example myObject). table has XID as primary autoincrement key. after insertion i need the XID that belongs to myObject, but myObject.getXID() is null.  how can i get it?

thanx.

johnny

RE: ID

Posted by Ivan Pilis <pi...@sturak.sk>.
>Check this thread from way back in December: 
>http://archives.apache.org/eyebrowse/BrowseList?listName=turbin
e-user@jakart
a.apache.org&by=thread&from=145159

Thanx.
(sorry 4 the inconvenience)


johnny


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ID

Posted by Scott Eade <se...@backstagetech.com.au>.
> From: "Ivan Pilis" <pi...@sturak.sk>
> 
>>> i am inserting row into db (mysql) using turbine om object
>>> autogenerated at ant init (for example myObject). table has XID as
>>> primary autoincrement key. after insertion i need the XID
>> that belongs 
>>> to myObject, but myObject.getXID() is null.  how can i get it?
>> 
>> This question has been asked a number of times so an answer
>> should be easily found in the mail list archives.  Here it is anyway...
>> 
>> After:
>>    myObject.save();
>> You can:
>>    myObject.getXID();
>> 
>> Before the save(), getXID() may well return null.
> 
> I had tried this, but getXID() is null after save (sorry, I forgot to
> mention that).

Check this thread from way back in December:
http://archives.apache.org/eyebrowse/BrowseList?listName=turbine-user@jakart
a.apache.org&by=thread&from=145159

I turned out that after regenerating the om everything started working for
Dan.  I suggest you try this too.  If it still doesn't work then post your
schema so we can check it.

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ID

Posted by Ivan Pilis <pi...@sturak.sk>.
>> i am inserting row into db (mysql) using turbine om object 
>> autogenerated at ant init (for example myObject). table has XID as 
>> primary autoincrement key. after insertion i need the XID 
>that belongs 
>> to myObject, but myObject.getXID() is null.  how can i get it?
>
>This question has been asked a number of times so an answer 
>should be easily found in the mail list archives.  Here it is anyway...
>
>After:
>    myObject.save();
>You can:
>    myObject.getXID();
>
>Before the save(), getXID() may well return null.

I had tried this, but getXID() is null after save (sorry, I forgot to
mention that).


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ID

Posted by Scott Eade <se...@backstagetech.com.au>.
> From: "Ivan Pilis" <iv...@pxpgroup.com>
> 
> i am inserting row into db (mysql) using turbine om object autogenerated at
> ant init (for example myObject). table has XID as primary autoincrement key.
> after insertion i need the XID that belongs to myObject, but myObject.getXID()
> is null.  how can i get it?

This question has been asked a number of times so an answer should be easily
found in the mail list archives.  Here it is anyway...

After:
    myObject.save();
You can:
    myObject.getXID();

Before the save(), getXID() may well return null.

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>