Skip to content

Commit

Permalink
adopted the web demo to work with hibernate 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobe91 committed Nov 15, 2016
1 parent de30a66 commit 94ad52c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ public <T> List<T> getCatHierarchy(Integer catId, EntityViewSetting<T, CriteriaB
.endOr()
.end()
.from(Cat.class, "cat")
.innerJoinOn(CatHierarchyCTE.class, "cte").on("cte.id").eqExpression("cat.id").end()
.from(CatHierarchyCTE.class, "cte")
.where("cte.id").eqExpression("cat.id")
.groupBy("cat.id")
.orderByAsc("cte.generation");

return evm.applySetting(setting, cb).getResultList();
return evm.applySetting(setting, cb, "cat").getResultList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @since 1.2
*/
@EntityView(Cat.class)
public interface CatFamilyTreeView extends CatView{
public interface CatFamilyTreeView extends CatView {

CatView getMother();

Expand All @@ -44,8 +44,8 @@ public <T> T createSubquery(SubqueryInitiator<T> subqueryInitiator) {
return subqueryInitiator.from(Cat.class)
.select("COUNT(*)")
.whereOr()
.where("father.id").eqExpression("OUTER(id)")
.where("mother.id").eqExpression("OUTER(id)")
.where("father.id").eqExpression("VIEW_ROOT(id)")
.where("mother.id").eqExpression("VIEW_ROOT(id)")
.endOr()
.end();
}
Expand Down

0 comments on commit 94ad52c

Please sign in to comment.