I have a JPA-persisted object model that contains a many-to-one relationship: an Account has many Transactions. A Transaction has one
Account
Transactions
Transaction
Resolved by saving dependent object before the next.
This was happened to me because I was not setting Id (which was not auto generated). and trying to save with relation @ManytoOne