struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: MySQL, iBatis, and mysql_insert_id
Date Thu, 03 Jun 2004 17:17:53 GMT
iBatis 2.0 has this ability.

The other option is to have a KeyGenerator class that handles all of 
this for you.  Don't use the auto generated keys from mysql.

Nathan

On Jun 3, 2004, at 11:07 AM, Andy Engle wrote:

> Hi all,
>
> I am working on a Struts app where I will be slapping some stuff into a
> database table, and from there I will need to get an insert ID back.  I
> am using a MySQL database, my database stuff is handled by iBatis, and
> I am assuming that I need to use the MySLQ command mysql_insert_id() to
> get that ID back so I can use it on secondary inserts which will need
> that ID as a key.
>
> Has anyone ever done anything like this before?  If not, what sorts of
> methods did you use in this scenario to accomplish this?
>
> Thanks very much for your help, as always.
>
>
> Andy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message