-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Retrieve child table records limited with parent table.
PostPosted: Mon Jul 05, 2010 6:10 am 
Newbie

Joined: Wed Nov 04, 2009 5:58 am
Posts: 3
I Have a 2 Tables lets say Department and Employee.
Parent :- Department
Child:- Employee

in Department mapping file Employee list bag created.

In employee table i have a column as "IsDeleted", we used this for deleted records because our client wants like this to not delete permanatly.

My problem is when i retrieve the department with session criteria automatically the list of employee records also will retrieve for each department this is fine.
But in employee the records are coming deleted also, but i need non-deleted records only when i retrieve "Department" table.

Please help me on this. I don't want to write any query and no need to loop for each records wheather this employee record is delete or not.

I need like this

"CreateCriteria(typeof(Department)).Add(Expression.Eq"

Scenario only. Please help me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.