• 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

cascadeType.Persists in hibernate

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using hibernate
I have parent A and children b .


I want just save cascade from A to b and if a is deleted I donot want to delete b. So in A I specified CascaseType.Persisits,
when I save parent it does not save b and If I say cascadetype.all only then it saves


I am surprised is this the usuals behaviour or am I missing something for which cascadeType.Persists is not working ?


 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

srini carry wrote:
I am using hibernate
I have parent A and children b .


I want just save cascade from A to b and if a is deleted I donot want to delete b. So in A I specified CascaseType.Persisits,
when I save parent it does not save b and If I say cascadetype.all only then it saves


I am surprised is this the usuals behaviour or am I missing something for which cascadeType.Persists is not working ?




I will put in different words ,


I am using hibernate
I have parent A and children b .


I want just to save b when I save A and if A is deleted I don't want to delete b. So in A I specified CascaseType.Persisits,
when I save A it does not save b and If I use cascadetype.all only then it saves b .


I am surprised is this the usual behavior or am I missing something for which cascadeType.Persists is not working ?

 
    Bookmark Topic Watch Topic
  • New Topic