• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

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.
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!