In class CriteriaSpecification I see only LEFT_JOIN definition, where is RIGHT_JOIN?
I need to build such subquery (in Oracle 9 notation): ... and some_column in ( SELECT Child.ID FROM Child, Parent WHERE Child.ParentID (+)= Parent.ID ) Parent class does not know nothing about joined childs, but Child class does. So, when I write final DetachedCriteria subCrit = DetachedCriteria.forClass(Child.class); subCrit.createAlias("parent", "parent", CriteriaSpecification.LEFT_JOIN); will produce ... WHERE Child.ParentID = Parent.ID(+)
I can't to write final DetachedCriteria subCrit = DetachedCriteria.forClass(Parent.class); subCrit.createAlias("child", "child", CriteriaSpecification.LEFT_JOIN);
because parent doesn't have property for "child".
Really I need to more complex subquery like: SELECT Child.ID FROM Child, Parent WHERE Child.ParentID (+)= Parent.ID and Child.ID is not null CONNECT BY PRIOR Parent.ID = Parent.ParentID START WITH Parent.ID = ?
because parents is tree and not each node of tree have joined child. ------
Eugene.
|