This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Hi. Consider these two tables: Order and OrderItem. The relationship is one to many. To save an order, two SQL command should be executed: Insert a row in Order table (ORDER_ID is auto generated). Insert a row in OrderItem table (OI_ID is auto generated and the primary key of the previous insert is needed in this command). I'm trying to adopt iBatis and MySQL as the database. The problem is I don't know how to get the PK of the first row in order to be passed to the second row? Any ideas?