Hi at all,
my Subject gives nearly all informations.
I am using Hibernate 2 and SQL Server 2005.
I wanne map an existing Database wich create its own Primary key. If it wouldnt, i could use
<id
name="Id"
type="integer"
column="__Org_RecordNo"
unsaved-value="0"
>
<generator class="identity"/>
to create the key by the mapping file. But in the given situation it doesn´t work. i´m using eclipse 3.1 and everytime when i want to record i get the message:
net.sf.hibernate.exception.GenericJDBCException: could not insert: [de.consistec.Ansprech_Partner.Adressen]
....
....
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement must be executed before the generated keys are available
Can anybody help me?
Greetings from Protonis
|