Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister
In directory sc8-pr-cvs1:/tmp/cvs-serv2157/hibernate/persister
Modified Files:
AbstractEntityPersister.java
Log Message:
fixed a bug parsing upper case IS NOT NULL, NOT IN, etc
improved some exception messages (incl patch by Max Andersen)
added Resin support
Index: AbstractEntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/AbstractEntityPersister.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** AbstractEntityPersister.java 30 Nov 2002 08:19:00 -0000 1.18
--- AbstractEntityPersister.java 6 Dec 2002 12:24:31 -0000 1.19
***************
*** 263,272 ****
public Serializable getIdentifier(Object object) throws HibernateException {
if (hasEmbeddedIdentifier) {
! return (Serializable) object;
}
else {
if (identifierGetter==null) throw new HibernateException( "The class has no identifier property: " + className );
! return (Serializable) identifierGetter.get(object);
}
}
--- 263,279 ----
public Serializable getIdentifier(Object object) throws HibernateException {
+ final Object id;
if (hasEmbeddedIdentifier) {
! id = object;
}
else {
if (identifierGetter==null) throw new HibernateException( "The class has no identifier property: " + className );
! id = identifierGetter.get(object);
! }
! try {
! return (Serializable) id;
! }
! catch (ClassCastException cce) {
! throw new ClassCastException( "Identifier classes must be serializable: " + cce.getMessage() );
}
}
|