Hey, I am using Hibernate2.1 and I want to use BigDecimals for all my primary keys. When I tried to have a id column that was a BigDecimal type I got this:
net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short
at net.sf.hibernate.id.IdentifierGeneratorFactory.get(IdentifierGeneratorFactory.java:38)
at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:725)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:715)
at com.hartehanks.baton.data.HibernateBase.save(HibernateBase.java:54)
at com.hartehanks.baton.data.facade.Test.testInsert(Test.java:44)
at com.hartehanks.baton.data.facade.Test.main(Test.java:23)
Does anyone know why the sequence field does not support BigDecimals and how much effort it would be to make the IdentifierGeneratorFactory support BigDecimals?
|