-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to compare a set in hql to a new user set
PostPosted: Mon Feb 25, 2008 1:54 pm 
Newbie

Joined: Mon Feb 25, 2008 1:14 pm
Posts: 8
Hello all
I try and try and did not succeed my self - so I need yours help.
I have 2 hibernate classes:
Event
{
int id;
int event_type;
Set<InsertionsString> insertionsStrings;
}

InsertionsString
{
int index;
String string;
}

I get from a data for creating a new event. I need to check in the db if the new insertion string set, i have, (for the same event type) are already in the db.
I tried in an hql:

from generated.generatedFiles.SignaledEvents sig
join sig.insertionsStrings ins
where ins.string='hhhhh' and ins.id.index=1 and sig.event_type=5

but this hql checks only one line of the set.
Do I need to take the result and compare the other sets line in my java code?

PLEASE HELP

thanks, thanks, thanks


Top
 Profile  
 
 Post subject: Re: How to compare a set in hql to a new user set
PostPosted: Mon Feb 25, 2008 3:38 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
Does this give you an idea on how to solve your problem?

http://forum.hibernate.org/viewtopic.php?t=983216&highlight=



Farzad-


Top
 Profile  
 
 Post subject: Thank you - I tried this but I did not succed
PostPosted: Tue Feb 26, 2008 5:53 am 
Newbie

Joined: Mon Feb 25, 2008 1:14 pm
Posts: 8
and i, by mistake, open a new message
http://forum.hibernate.org/viewtopic.ph ... highlight=

thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.