-->
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: ERROR [illegal attempt to dereference collection]
PostPosted: Thu Aug 23, 2007 12:07 pm 
Newbie

Joined: Thu Aug 23, 2007 11:59 am
Posts: 10
Code:
@Entity
@NamedQueries( {
    @NamedQuery(name = "A.findDummy", query = "from T t where t.id not in (select a.mask.id from A a where a.id = ?)")

})
public class A {   
   @ManyToMany
   private List<Something> mask;

}


@Entity
public class T{   
   @Id
   private Integer id;
}


Can you help me to rewrite this query?

Code:
from T t where t.id not in (select a.mask.id from A a where a.id = ?)


The error "illegal attempt to dereference collection" is signaled here and here


Thanks

Hibernate version:3.2.2


Last edited by terun on Mon Aug 27, 2007 8:39 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 4:24 am 
Newbie

Joined: Thu Aug 23, 2007 11:59 am
Posts: 10
EDIT#2

I resolve changing the query:
Code:
from T t where t not in (select m from A a join a.mask m where a.id = ?)


The lastest version of hibernate do not support the automatic join.

Bye


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.