-
1. Re: Disable ID generation for entity beans temporarily ?
wolfgangknauf Nov 7, 2006 11:25 AM (in response to horst21)Hi Tobias,
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>
-
2. Re: Disable ID generation for entity beans temporarily ?
horst21 Nov 15, 2006 4:37 AM (in response to horst21)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. -
3. Re: Disable ID generation for entity beans temporarily ?
wolfgangknauf Nov 15, 2006 9:00 AM (in response to horst21)Hi 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
Wolfgang -
4. Re: Disable ID generation for entity beans temporarily ?
horst21 Nov 20, 2006 6:12 AM (in response to horst21)Hi Wolfgang,
reading the ejb-spec lead the way ;-), I can disable ID-generation through the orm.xml now.
thank you very much for your help,
Tobias.