Hi I'm trying to save a transient object, with session.saveOrUpdate(object), however when the statement executes the primary id is included in the query and is given a null value.
Is there anyway to insert without the primary key??
I am using xDoclet to tag the object class, and using the generator class
'identity' to generate keys.
Thanks
Hibernate version:3.1
Full stack trace of any exception that occurs:
10:46:05,546 WARN JDBCExceptionReporter:71 - SQL Error: 339, SQLState: S1000
10:46:05,546 ERROR JDBCExceptionReporter:72 - DEFAULT or NULL are not allowed as explicit identity values.
10:46:05,562 ERROR HibernateCustomerService:? - org.hibernate.exception.GenericJDBCException: could not insert: [domain.WebAccessCode]
Name and version of the database you are using:
MS SQL 2005
The generated SQL (show_sql=true):
Hibernate: insert into dbo.CustWebAccess (cwa_AccessCode, cwa_custnum, cwa_nopricetext, cwa_password, cwa_permitacct, cwa_per
mitadmin, cwa_permitbackorder, cwa_permiteditusers, cwa_permitorder, cwa_permitseecost, cwa_permitseesell, cwa_permitupload,
RecID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, null)
|