Hibernate version:2.1.6
Hello there! I'm following the receipt for enums and hibernate as shown on
http://www.hibernate.org/203.html I've created all classes as described.
Well, then I have a class YesNoEnum that extends PersistentCharacterEnum.
When trying to save an object it throws :
Code:
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to determine the type of the specified object.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source)
at com.araujo.convenios.model.enum.PersistentEnum.nullSafeSet(PersistentEnum.java:276)
at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118)
at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:507)
... 24 more
What's odd is that I've already tried the same code with mySQL with no problems at all.
Could someone help me out?
Thanks all
Vinicius