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: Problem with Create Criteria
PostPosted: Mon Mar 22, 2010 4:26 am 
Newbie

Joined: Sat Feb 20, 2010 4:29 am
Posts: 2
Hi to all , I am newbie in nhibernate. Most of the work I have done with sql queries.I need to perform a task in which two tables are exist, Employees and Admin.
In admin Table there are only two columns,( AdminID and EmployeeID),where EmployeeID is a foreign key and I want to fetch data like this with create criteria

"Select *,isnull((Select AdminID from Admin Where EmployeeID=emp.EmployeeID),0) as AdminID from Employee emp Where emp .Email=@Email"


please help me out


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.