Endre Meckelborg Rognerud
2005-03-31 11:55:49 UTC
Hello!
I'm new to Hibernate and Middlegen. I think this is an easy issue, but I
haven't found a solution yet.
I'm porting an application to Hibernate, so the Oracle database is
already there. I have used Middlegen (with Maven) to create the
hibernate mapping files. Here is some of my configuration:
maven.middlegen.0.hibernate.javatypemapper=middlegen.plugins.hibernate.HibernateJavaTypeMapper
maven.middlegen.0.hibernate.standardgeneratorscheme=sequence
maven.middlegen.0.hibernate.standardgeneratorarg={0}_SEQ
I'm using Oracle, and default all the number-fields are mapped to the
type BigDecimal. This also includes the id-fields.
When I try to save a new object in Hibernate, I get the following exception:
"net.sf.hibernate.id.IdentifierGenerationException: this id generator
generates long, integer, short"
What is the way to fix this? Should I change my id-fields to be of type
Long? Can I use a property etc. to let Middlegen fix this automatically
when running Middlegen again?
Thanks for some tips :)
I'm new to Hibernate and Middlegen. I think this is an easy issue, but I
haven't found a solution yet.
I'm porting an application to Hibernate, so the Oracle database is
already there. I have used Middlegen (with Maven) to create the
hibernate mapping files. Here is some of my configuration:
maven.middlegen.0.hibernate.javatypemapper=middlegen.plugins.hibernate.HibernateJavaTypeMapper
maven.middlegen.0.hibernate.standardgeneratorscheme=sequence
maven.middlegen.0.hibernate.standardgeneratorarg={0}_SEQ
I'm using Oracle, and default all the number-fields are mapped to the
type BigDecimal. This also includes the id-fields.
When I try to save a new object in Hibernate, I get the following exception:
"net.sf.hibernate.id.IdentifierGenerationException: this id generator
generates long, integer, short"
What is the way to fix this? Should I change my id-fields to be of type
Long? Can I use a property etc. to let Middlegen fix this automatically
when running Middlegen again?
Thanks for some tips :)
--
Regards...
Endre Rognerud
Regards...
Endre Rognerud