i used getGeneratedKeys after inserting in B开发者_StackOverflow社区atchmode. I presume that the order i with the keys are returned is the same as the inserts in my batched insert statments. I want to use the keys as foreign keys in an other table and need to map the data to the foreign key.
- Is this correct? The API doesn't say anything about the order... :-(
- What happens if I do "insert ignore", do I have to calulate the offset from the executeBatch()-Function? Or is there an easier way to map generated keys and inserted data in my java app?
Thanks soooo much guys. I'm happy for any hint.
精彩评论