Getting generated identifier for JPA native insert query
问题 For performance reasons I need to use some native queries to insert new objects into a database. I have a very sophisticated JPA persistence layer which manages my usual entity reading and writing and I would like to use this persistence layer to run the native queries. I know I need the methods EntityManager#createNativeQuery(String) and Query#executeUpdate to achieve my goal. My current problem is that I would also like to get the generated identifier of the newly inserted row. I know this