This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Hibernate Cascade attribute  RSS feed

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to know when we use cascade attribute. I saw setting cascade=true within set property attribute while doing many-one, one-many association hibernate examples. any ideas, suggestions, sample code, resources, links highly appreciated.thanks in advance
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cascade is used when an item in table A relies on an item in Table B (ie has a foreign key reference) and the data in table A has no meaning if the item in Table B is deleted.

eg A Person has an Address, the Address contains the ID of the Person. If a Person is deleted then the delete operation should cascade so that it deletes the Address to.
Operations should not always cascade but you should consider the impact of deletes (and other operations) on foreign key constraints.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you haven't seen the messages regarding your display name in your private messages, you should do so immediately.
Please consider this your final warning.
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>>If you haven't seen the messages regarding your display name in your private messages, you should do so immediately.

where can i find private messages. Please let me know
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!