-->
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: usign the where attribute in the class element
PostPosted: Fri Sep 05, 2003 2:08 pm 
Newbie

Joined: Tue Aug 26, 2003 9:52 am
Posts: 15
Hello,

Somehow I can't get the where attribute of the class element to work. It doesn't get appended because in
net.sf.hibernate.persister.EntityPersister.queryWhereFragment forceDiscriminator evaluates to true.

But I'm not using the discriminator.

Any ideas,

Thanks a lot.

Alan.


Top
 Profile  
 
 Post subject: not sure what you're doing...
PostPosted: Fri Sep 05, 2003 2:48 pm 
Beginner
Beginner

Joined: Thu Sep 04, 2003 2:50 pm
Posts: 45
Location: US: New York NY
here is a snippet of something i did

Code:
Object[] values = new Object[3];
values[0] = "published";
values[1] = new java.util.Date();
values[2] = new java.util.Date();
net.sf.hibernate.type.Type[] types = new net.sf.hibernate.type.Type[3];
types[0] = Hibernate.STRING;
types[1] = Hibernate.DATE;
types[2] = Hibernate.DATE;
java.util.List playlists = (java.util.List)sess.filter(frame.getList(),
"where this.status.name = ? and (this.showEdate is null or this.showEdate > ?) and (this.showSdate is null or this.showSdate <= ?) order by sort_order",
values,
types);


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 4:25 am 
Newbie

Joined: Tue Aug 26, 2003 9:52 am
Posts: 15
The where attribute and the discriminator are used only when using query, filters but not when user the Session.load() method.


Alain.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 8:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
The where attribute and the discriminator are used only when using query, filters but not when user the Session.load() method.


Which makes incredibly good sense when you think about it ;)


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.