Get last record inserted - Hibernate

// Ejemplo con lista List<Kabinet> result = session.createQuery("from Kabinet ORDER BY id DESC") .setMaxResults(1) .list(); // Ejemplo sin lista Kabinet result = (Kabinet) session.createQuery("from Kabinet ORDER BY id DESC") .setMaxResults(1) .uniqueResult();

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.