-->
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: IQurey expression for enum property that flags attribute add
PostPosted: Fri Nov 07, 2008 10:26 pm 
Newbie

Joined: Fri Nov 07, 2008 9:18 pm
Posts: 4
hi

my class have a property named WorkType (enum) that added flags attribute. this property keep multiple enum value (FullTime | PartTime | Freelance). i want query using IQuery interface, but can't do it:(

my query;
(for example, my enum property value is "FullTime | PartTime | Freelance")

IQuery query = Session.CreateQuery("select a from Entity.Advert a where a.WorkType = :p1 or a.WorkType = :p2");
query.SetEnum("p1", enmWorkType.FullTime);
query.SetEnum("p2", enmWorkType.PartTime);

query.List<Entity.Advert>();

this query return 0 count

how can i do this query?


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.