This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Event testEvent = new Event(); java.util.Set forList = new java.util.HashSet(); testEvent.setFid(65); forList.add(new foreign1("test",1, 65, testEvent)); testEvent.setListValue(forList); session.save(); tx.commit(); It is genearting two SQL statements
Hibernate: insert into abc (name, ID) values (?, ?) Hibernate: update xyz set ADDRESS=?, fid=? where id=? fid is a foreign key
i want that it should genrate two sql insert statements for both table when it is saving record. but it is not doing so it is trying to update table xyz. please resolve it.