We have a DAO object with Hibernate. I cannot get rid of a warning regrading LAST_INSERT_ID () being an unknown database function. It would be very nice to be able to get rid of this warning. At run time, it is not causing any functional issue. Just the annoying warning. Perhaps, this type of use-case can be addressed differently. If that's the case I also welcome the alternate way (actually I am not sure if we even need this -- would not storing the data return the id anyway?
int accountId = insert.executeUpdate();
BigInteger lastId = (BigInteger) entityManager.createNativeQuery("SELECT LAST_INSERT_ID()")
IntelliJ Ultimate: 2017.2.3
MySQL Drive: 5.1.40 via the "Data Source and Drivers" config screen.