you could try to override the annotations with a deployment descriptor (orm.xml) and remove bold "generated value" attribute.
<entity class="..." metadata-complete="true"> <table name="..."></table> <attributes> <id name="id"> <column name="ID" /> <generated-value/> </id> <basic name="..."> <column name="..." /> </basic> </attributes> </entity>
yes, I think using a deployment descriptor might work for me, thanks for the tip!
but I do not know what a "orm.xml" file is. Do you mean "hbm.xml"? Or do you mean the the "ejb-jar.xml" deployment descriptor?
When searching the web for documentation about it, I could not find any. Do you know if there is documentation about this, and where it I can find it?
Thanks a lot, Tobias.
"orm.xml" is new in EJB3, and it describes how the bean is mapped to the database (e.g. table names, column names, datatypes, just everything which can b declared with annotations).
If you read the EJB book by Monson-Haefel/Burke you will find some information about it.
Or you start by digging around the ejb specifiation: http://jcp.org/aboutJava/communityprocess/final/jsr220/index.html (take a look at the PDF labeled "JSR-000220 Enterprise JavaBeans 3.0 Final Release (persistence)").
Hope this helps
reading the ejb-spec lead the way ;-), I can disable ID-generation through the orm.xml now.
thank you very much for your help,