dear hibernate gurus!
is it possible to change properties from the mapping at runtime? in my case i have the following mapping xy.hbm.xml
Code:
<class name="User" table="user">
<id name="id" column="ID" type="long">
<generator class="native"/>
</id>
....a.s.o.
this works fine, no problem. the needed id is generated automatically.
BUT:
if i want to write the id field on my own, there is no way (for example if i want to import an exact database dump, with correct ids). i have to change the generator class from 'native' to 'assigned' by hand in each mapping file.
So the question is:
when i start my application with the arg -import, all generator classes should be changed to 'assigned'.
i've searched in Hibernate Mapping API (ClassMetadata, PersistentClass,...) without any success.
please help (with code snippets if possible).
thx in advance
Hibernate version:3.2