Record « ID « JPA Q&A





1. Get record with max id, using hibernate    stackoverflow.com

i want to use hibernate to get record from db, such that it's with the max dbId, i tried to use projections, creating alias for 'max(dbId)', then using it in 'restrictions.eq', ...

2. Record has not been saved, but auto-incremented id in database has been incremented    stackoverflow.com

I have two tables to store answers and HTML template of a form. Table answers has foreign key whih refers to primary key in html_templates table. There is a problem when ...

3. How Do I Create a Record Without an ID    forum.hibernate.org

I'm using Hibernate and Spring for the first time to write a web front end to a legacy database based on Oracle 9i, which is also written to by other back end processes. Unfortunately, records on the database tables are created by inserting records and allowing triggers to create the primary keys from a sequence. How can I create a record ...

4. Problem checking a record by ID    forum.hibernate.org

Please, help me. In a java-hibernate query I have to test if exist a record with a ID (primary key), without throwing an Exception if the record doesn't exist. I've tried this code: if(theClassThatMakeTheQuery.getRecordById(testId)!=null)){ ... } but it does'nt work because when the record with the testID doesn't exist, it throws an exception. I need a true/false result or anything else ...