• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parent key not found, Save two connected objects

 
Kamil Kuchta
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
applicationContext.xml

In OrderDetails is a reference @ManyToOne to OrderGeneral.
The problem is that I can not save OrderGeneral and referenced on it OrderDetails in one method/transaction. This is my method:


Exception:


OrderDetailsDAO is


Unfortunatly the problem is not in mapping, I checked it several times, and what is more saving another two connected object (ex Person and City which doesn't exist in base) ends with the same exception (of course another parent key is not found).
I faced up this problem 2 months ago and I'm still fighting with it.
Please for help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic