Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319411 - Incorrect "outer join" error when using @Embedded object
Summary: Incorrect "outer join" error when using @Embedded object
Status: CLOSED DUPLICATE of bug 303703
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 13:27 EDT by Ed Randall CLA
Modified: 2022-06-09 10:23 EDT (History)
4 users (show)

See Also:


Attachments
Sample project with testcase (23.86 KB, application/zip)
2010-07-09 13:31 EDT, Ed Randall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Randall CLA 2010-07-09 13:27:52 EDT
Build Identifier: 2.1.0.v20100614-r7608

When running the query:

"SELECT NEW scratch.eclipselink.embedded.Bean( 
a.id, a.c1, a.c2.state, a.c2.effectiveTime ) FROM Test2Concrete a 

where c2 is an @Embedded object and there are no joins, this exception occurs:

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[c2]].
	at org.eclipse.persistence.exceptions.QueryException.outerJoinIsOnlyValidForOneToOneMappings(QueryException.java:924)
	at org.eclipse.persistence.internal.expressions.QueryKeyExpression.validateNode(QueryKeyExpression.java:863)
	at org.eclipse.persistence.expressions.Expression.normalize(Expression.java:3009)


This worked fine on Eclipselink 1.1.3 and Toplink essentials

Reproducible: Always

Steps to Reproduce:
See attached test project.
Run scratch.eclipselink.embedded.Main
Comment 1 Ed Randall CLA 2010-07-09 13:31:45 EDT
Created attachment 173884 [details]
Sample project with testcase

Run scratch.eclipselink.embedded.Main
(ignore the scratch.eclipselink.mappedsuperclass hierarchy)
Comment 2 Tom Ware CLA 2010-08-09 13:53:08 EDT
Setting target and priority.  See the following page for details of the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 3 Ed Randall CLA 2010-11-19 13:02:43 EST
This seems to be fixed in 2.2.0-M4
Comment 4 Tom Ware CLA 2010-11-19 13:17:51 EST
Closing based on above comment.
Comment 5 Chris Delahunt CLA 2011-06-06 11:32:32 EDT
I can't find what caused the issue from 1.1 to 2.1, but the fix for 303703 resolved this as well.  Setting it as a duplicate of 303703.

*** This bug has been marked as a duplicate of bug 303703 ***
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:23:48 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink