Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

parent key not found, Save two connected objects

 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic