1. HSQLDB Internals: Hibernate and Integer vs Long Ids stackoverflow.comI am creating database Entities in my Java application and trying to rationalize between using an Integer or a Long as the class type of the "id" field. I am using ... |
2. Using hibernate's session.get() with a long ID stackoverflow.comI would like to use IDs of type |
3. Provided id of the wrong type. Expected: Long got Integer forum.hibernate.orgNewbie Joined: Wed Mar 11, 2009 7:15 am Posts: 12 I got exception Code: org.springframework.orm.hibernate3.HibernateSystemException: Provided id of the wrong type. Expected: class java.lang.Long, got class java.lang.Integer; nested exception is org.hibernate.TypeMismatchException: Provided id of the wrong type. Expected: class java.lang.Long, got class java.lang.Integer at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:679) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) ... |
4. Why do many hibernate examples use long for the id? forum.hibernate.org |
5. Why use Long id's? forum.hibernate.org |
6. HQL does not differentiate between long id and sourceAuditId forum.hibernate.orgDear All, I want your openion if I shall submit this as a bug into JIRA. The problem: I have a persistant class called SourceAudit as described below public class SourceAudit implements Serializable { private long sourceAuditId; PK private Date version; private long id; // a property etc... } the mapping file name is SourceAudit.hbm.xml |
7. "Long id" or "long id" forum.hibernate.org |
8. CollectionOfElement containing long ids forum.hibernate.org |