JCR.SQL2 Join error
manuel.gentile Jun 28, 2010 11:09 AMMaybe there is a mistake in the class JoinComponent.
at line 359 the parameters og Joinable object have to be swapped like in the folliwing code...
Moreover I have some problems with casting .... (BasicPath is not castable to Location reference!)
else if (condition instanceof ChildNodeJoinCondition) { ChildNodeJoinCondition joinCondition = (ChildNodeJoinCondition)condition; String childSelectorName = joinCondition.getChildSelectorName().getName(); if (left.getColumns().hasSelector(childSelectorName)) { // The child is on the left ... return new Joinable() { public boolean evaluate( Object parentLocation,Object childLocation ) { Path childPath=null; Path parentPath =null; if (childLocation instanceof BasicPath) { childPath =((BasicPath) childLocation).getCanonicalPath(); } else childPath = ((Location)childLocation).getPath(); if (parentLocation instanceof BasicPath) { parentPath =((BasicPath) parentLocation).getCanonicalPath(); } else parentPath = ((Location)parentLocation).getPath();
At the end matking a query like this
select lom.* from [lom:Metadata] as lom JOIN [lom:LangString] as lang ON ISCHILDNODE(lang,lom)
in which lom:LangString is a child node of lom:Metadata type I have an error like this
There has been an error processing your command null java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.modeshape.graph.query.process.JoinComponent$2.merge(JoinComponent.java:217) at org.modeshape.graph.query.process.NestedLoopJoinComponent.execute(NestedLoopJoinComponent.java:69) at org.modeshape.graph.query.process.ProjectComponent.execute(ProjectComponent.java:48) at org.modeshape.graph.query.process.QueryProcessor.execute(QueryProcessor.java:93) at org.modeshape.graph.query.QueryEngine.execute(QueryEngine.java:111) at org.modeshape.jcr.RepositoryQueryManager$SelfContained.query(RepositoryQueryManager.java:361) at org.modeshape.jcr.JcrQueryManager$JcrQuery.execute(JcrQueryManager.java:379)
Thanks