Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sess.createSQLQuery("INSERT INTO ARCHIVE (folder) VALUES(:folder)") .setParameter("folder",path) .executeUpdate();
新しく作成されたオブジェクトのIDが欲しいです。どうやってやるの?
それを試してみてください
整数lastId=(整数)session.createSQLQuery( "SELECT LAST_INSERT_ID()").uniqueResult();