-->
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: Many to Many realtion, filter no applied
PostPosted: Mon Dec 05, 2005 3:48 am 
Newbie

Joined: Tue Nov 22, 2005 6:04 am
Posts: 4
Got in entity, say X with

@FilterDef(name = "filter", parameters = { @ParamDef(name = "falseVal", type = "integer") })

@Filters({ @Filter(name = "filter", condition = "(:falseVal = rating)") })


I have another entity Y that has a Set of X that is mapped with a
@ManyToMany annotation, a join table is used to the relation.

When i retrieve the entity from a "from X ....." the filter works just fine

But, when i do Y.getX() the collection is initialized without the filter applied !

Any way to apply the filter ?

I've tried setting the filter to the collection mapping but get an SQLException because Hibernate tries to apply the filter to the join table no to the table containing the entity.


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.