Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Getting sub-collection in SELECT statement

I have probably a stupid question, but I don't seem to find the answer in
the documentation.
I have an entity called RelationNodeEntity. There I have a foreign key to
NodeEntity and RelationNodeEntity along with other properties. Anyway, I
want to load the NodeEntity when RelationNodeEntity complies to certain
I have this example code (snippet):
Expression relatioNodeExpression = new
Expression step1 = 
Expression step2 = step1.and(... other expression - irrelevant);
ReadAllQuery query = new ReadAllQuery(RelationNodeEntity.class, step2);
But then I get the RelationNodeEntities. How can I change the SELECT
statement that the query only selects the NodeEntity object? It works in
EQL, there I write "SELECT r.nodeEntity FROM RelationNodeEntity r". What am
I doing wrong or which mistake do I make here?
Jan De Cooman
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top