Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » QueryException occurs on an expression that is using getAllowingNull() on an aggregate attribute.(Exception Description: An outer join (getAllowingNull or anyOfAllowingNone) is only valid for OneToOne, OneToMany, ManyToMany, AggregateCollection and DirectCollection Mappings, and cannot be used for)
QueryException occurs on an expression that is using getAllowingNull() on an aggregate attribute. [message #813661] Mon, 05 March 2012 10:18 Go to next message
Eclipse UserFriend
Hi,

I have query defined as follows:

ReadAllQuery query = new ReadAllQuery(User.class);
ExpressionBuilder eb = new ExpressionBuilder(User.class);
query.addOrdering(eb.getAllowingNull("aggregateUser").get("aggregateName"));

Attribute aggregateUser is defined as aggregate object of the object User.This query throws following QueryException:

Exception Description: An outer join (getAllowingNull or anyOfAllowingNone) is only valid for OneToOne, OneToMany, ManyToMany, AggregateCollection and DirectCollection Mappings, and cannot be used for the mapping [org.eclipse.persistence.mappings.AggregateObjectMapping].

Should I prevent using getAllowingNull() on agreggate attibutes? Or is there any another solution?



[Updated on: Mon, 05 March 2012 10:23] by Moderator

Re: QueryException occurs on an expression that is using getAllowingNull() on an aggregate attribut [message #813749 is a reply to message #813661] Mon, 05 March 2012 12:08 Go to previous message
Eclipse UserFriend
Just use get(), getAllowingNull() is only for outer joins, and you are not joining.
Previous Topic:Oracle11g-HSQLDB
Next Topic:JPA and Temporal Databases
Goto Forum:
  


Current Time: Mon Jul 07 21:19:55 EDT 2025

Powered by FUDForum. Page generated in 0.03794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top