Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

inverse & cascade attribute - Help !!!

 
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran, the link provided by you is really a nice one. but sill i have few doubts :

In case of Item -> Bid Bidirectional Association

Item.hbm.xml


Item.java


Can you please justify the output in the following cases :
Case 1:
inverse="true"
bid.setItem(this);
RESULT : No Error. No INERST statement

Case 2:
inverse="false"
bid.setItem(this);
RESULT : No Error. No INERST statement

Case 3:
inverse="true"
this.bids.add(bid);
RESULT : Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value: Bid.item

Case 4:

inverse="false"
this.bids.add(bid);
RESULT : Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value: Bid.item
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep,

Sorry i did not notice your post in your original thread here. Let's continue the discussion in that thread.
    Bookmark Topic Watch Topic
  • New Topic