-->
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.  [ 4 posts ] 
Author Message
 Post subject: Attribute where in class element
PostPosted: Wed Nov 22, 2006 3:40 am 
Newbie

Joined: Mon Nov 20, 2006 9:10 am
Posts: 4
Hello,

I need to know when clause SQL is executed indicated in the attribute where
of an element class.

Thank you very much.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 5:54 am 
Beginner
Beginner

Joined: Tue Nov 21, 2006 5:18 am
Posts: 31
Location: Bangalore, India
where clause is like a static condition.
Let's say if you want to fetch the employees born on 14-02.1979. you can set that in where condition like,

<class name="Employee" table="tbl_emplyee" where="dob='14.02.1979'" >
<property name="Empname" />
</class>

_________________
persist_coder
--credit please if it helps you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 6:30 am 
Newbie

Joined: Mon Nov 20, 2006 9:10 am
Posts: 4
In agreement, and if I love all those employees whose name is john. As is the result? All those employees who are called johnand who have been born the 14.02.1979.


And if I execute.

hql= " from employee where employee.name='john'"

As is the result.

Thank you very much.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 7:30 am 
Beginner
Beginner

Joined: Tue Nov 21, 2006 5:18 am
Posts: 31
Location: Bangalore, India
Yes that is right

if you want to fetch those who born on 14.02,1979 and whose name is john.

_________________
persist_coder
--credit please if it helps you


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

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.