wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Can anyone tell why is this query not valid? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

Can anyone tell why is this query not valid?

Eduardo Born
Greenhorn

Joined: Oct 26, 2010
Posts: 3
Hello!
I have criteria query that, when executed, results the following exception thrown:



The id attribute is the entity's attribute which was annotated with @Id @GeneratedValue. Basically I'm trying to load the attribute "permissions", which is a collection uninitialized at the time, for the role object whose id is 2. The id attribute is of long type.

Any ideas on why this query would fail?

It seems correct to me...

I can post the code that creates the criteria query here, but it is fairly complicated (as it generates based on a LDAP filter, etc), so I'm hoping the error will be visible from the generated query string and the exception. Please let me know if that's not the case.

Thanks!!
Eduardo Born
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Don't duplicate threads. Continue there.


[My Blog]
All roads lead to JavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: Can anyone tell why is this query not valid?
 
Similar Threads
Unable to locate appropriate constructor
MySQL + Hibernate: HTTP servlet broken pipe with entity manager
@ManyToMany delete problem
Can anyone tell why is this query not valid?
Exception when accessing Javaranch