| Damian Bułak, I am not able to reproduce your issue. It is not surprising that NULL gets inserted for a nullable association. Later in flush, the association should be updated. If the update does not happen, then it would be a bug. Unfortunately, I cannot reproduce it, then I can't fix it. Please work with your test case to see if you can get it to reproduce. One thing that would help is to use ordered lists instead of a Set (Bag#items) or Hibernate "bag" (Item#features). Using an ordered list will make the cascade order of the entities contained in the collection determinate. Once that is done, you can try changing the order of the entities in the collections to reproduce your issue. |