mirror of
https://github.com/apache/openjpa.git
synced 2025-02-08 11:06:01 +00:00
OPENJPA-1098 JPA2 Query support for subselect_identification_variable
no functional changes git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@779447 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1b842d492
commit
87b66ae764
@ -1513,7 +1513,7 @@ public class JPQLExpressionBuilder
|
|||||||
new Object[]{ name }, null);
|
new Object[]{ name }, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Value validateMapPath(JPQLNode node, JPQLNode id) {
|
private Path validateMapPath(JPQLNode node, JPQLNode id) {
|
||||||
Path path = (Path) getValue(id);
|
Path path = (Path) getValue(id);
|
||||||
FieldMetaData fld = path.last();
|
FieldMetaData fld = path.last();
|
||||||
|
|
||||||
@ -1550,7 +1550,7 @@ public class JPQLExpressionBuilder
|
|||||||
throw parseException(EX_USER, "bad-general-identifier",
|
throw parseException(EX_USER, "bad-general-identifier",
|
||||||
new Object[]{ id.text, "VALUE" }, null);
|
new Object[]{ id.text, "VALUE" }, null);
|
||||||
|
|
||||||
Path path = (Path) validateMapPath(node, id);
|
Path path = validateMapPath(node, id);
|
||||||
FieldMetaData fld = path.last();
|
FieldMetaData fld = path.last();
|
||||||
path = (Path) factory.getKey(path);
|
path = (Path) factory.getKey(path);
|
||||||
ClassMetaData meta = fld.getKey().getTypeMetaData();
|
ClassMetaData meta = fld.getKey().getTypeMetaData();
|
||||||
@ -1566,7 +1566,7 @@ public class JPQLExpressionBuilder
|
|||||||
|
|
||||||
private Value getQualifiedIdentifier(JPQLNode node) {
|
private Value getQualifiedIdentifier(JPQLNode node) {
|
||||||
JPQLNode id = onlyChild(node);
|
JPQLNode id = onlyChild(node);
|
||||||
Path path = (Path) validateMapPath(node, id);
|
Path path = validateMapPath(node, id);
|
||||||
|
|
||||||
if (node.id == JJTVALUE)
|
if (node.id == JJTVALUE)
|
||||||
return path;
|
return path;
|
||||||
@ -1578,17 +1578,17 @@ public class JPQLExpressionBuilder
|
|||||||
return factory.mapEntry(path, value);
|
return factory.mapEntry(path, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Value getQualifiedPath(JPQLNode node) {
|
private Path getQualifiedPath(JPQLNode node) {
|
||||||
return getQualifiedPath(node, false, true);
|
return getQualifiedPath(node, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Value getQualifiedPath(JPQLNode node, boolean pcOnly, boolean inner)
|
private Path getQualifiedPath(JPQLNode node, boolean pcOnly, boolean inner)
|
||||||
{
|
{
|
||||||
int nChild = node.getChildCount();
|
int nChild = node.getChildCount();
|
||||||
JPQLNode firstChild = firstChild(node);
|
JPQLNode firstChild = firstChild(node);
|
||||||
JPQLNode id = firstChild.id == JJTKEY ? onlyChild(firstChild) :
|
JPQLNode id = firstChild.id == JJTKEY ? onlyChild(firstChild) :
|
||||||
firstChild;
|
firstChild;
|
||||||
Path path = (Path) validateMapPath(firstChild, id);
|
Path path = validateMapPath(firstChild, id);
|
||||||
|
|
||||||
if (firstChild.id == JJTIDENTIFIER)
|
if (firstChild.id == JJTIDENTIFIER)
|
||||||
return getPath(node);
|
return getPath(node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user