3 ms·
> You still need a round trip to the DB to get an ID No you don't. Not sure about MySQL but Oracle supports returning generated keys as part of an insertion[1
by sehrope 13y ago
> You still need a round trip to the DB to get an ID
No you don't. Not sure about MySQL but Oracle supports returning generated keys as part of an insertion[1]. An additional round trip is not required as it comes back in the "success" response of the insert itself.
[1]: http://info.michael-simons.eu/2007/10/09/jdbc-get-autogenerated-keys-on-a-oracle-db/ http://info.michael-simons.eu/2007/10/09/jdbc-get-autogenera...