Need help with Hibernate? Read this first:
Hibernate version:3.13
Mapping documents:
<set name="bids"
cascade="save-update">
<key column="ITEM_ID"/>
<one-to-many class="Bid"/>
</set>
Code between sessionFactory.openSession() and session.save(Item); session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
insert into ITEM (NAME, ID) values (?, null);
update BID set NAME=? where ID=?
Debug level Hibernate log excerpt:
I want to insert "items" and it's "bids"
cascade="save-update" is also added. but hibernate generate "update BID" instead of "insert BID"
some body know why?
Thanks
Rick
|