• Post Reply Bookmark Topic Watch Topic
  • New Topic

special deleting (using joined-subclass in hibernate )

 
dmitry dvoinov
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi 2 all!
I have such hibernate mapping:



if anyone knows how to delete records from TABLE2 without deleting corresponding records in TABLE1?
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Unless Class1 is abstract, I see no serious obstacle to deletion from Table2 by raw SQL or by a separately mapped class; this appears easier than trying to change the type of an entity object from Class2 to Class1.
I hope that you have a reason for changing the type, but that's another question...
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!