Hi,
I have the following question concerning generators. I hope someone out there can help me. Thanks a lot for every reply!!
I have a persistent class with an Integer-ID. Normally I want Hibernate to set this ID automatically. That is why I mappd it like this:
<id name="productId" column="productId" type="integer">
<generator class="increment"/>
</id>
This works well, but sometimes I need to set the ID of an Object by myself.....I tried to do this by coding
"product.setProductId(new Integer(555))"
,but Hibernate ignores this....
IS THERE A POSSIBILITY TO MIX the ID-GENERATING??
Thanks...
|