-->
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.  [ 2 posts ] 
Author Message
 Post subject: Bag intersection within where clause in selects
PostPosted: Mon Sep 12, 2005 11:15 am 
Newbie

Joined: Mon Sep 12, 2005 11:09 am
Posts: 2
Location: Germany
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject: Re: Bag intersection within where clause in selects
PostPosted: Mon Sep 12, 2005 11:23 am 
Newbie

Joined: Mon Sep 12, 2005 11:09 am
Posts: 2
Location: Germany
Sorry, I pressed Enter to early.

I am new around here and not very experienced with hibernate.
I have a question regarding a selection with a BAG in condition.

I have the following example code:

public class Person{
private List schedules = new ArrayList();
...
...


I build a criteria dinamicaly and at a certain point I need to build a condition that at least one element in Person.schedules exists into another (generated at run-time) list (ex. List possibleSchedules = new ArrayList()).

I don't have a clue on how to build this using Expression, and I tried something like the following in HQL: any elements(Person.schedules) in elements(:p) where in :p will come the parameter possibleSchedules.

I get a dump with a message saying that ANY column was not found.
I am sure my query is not correct, but can anyone suggest me how to handle this? (using Criteria or HQL, however).

Thanx,
Horia


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