This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibenate delete problem

 
jaisai vijay
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have parent Table tableA and I have a child table TableB.

If I want to delete record from TableA based on the primary key TableAID How Can I write HQL query for this scenario? The TableAID is foreign key in the child table.

Thanks,.
 
Lucene china
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
only if you mapping in the parent table,you can delete it when you delete parent table record.
 
jaisai vijay
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply I solved it by doing the mapping in the parent table. I had to map as one to many.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic