Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string sql = "from Recipe r " +
- "left join fetch r.Images " +
- "inner join fetch r.User " +
- "where r.Completed!=0";
- IList<Recipe> recipes = (IList<Recipe>)session.CreateQuery(sql)
- .SetMaxResults(20)
- .List<Recipe>();
- string sql = "from Recipe r " +
- "left join fetch r.Images " +
- "inner join fetch r.User " +
- "where r.Completed!=0";
- var recipes = session
- .CreateQuery(sql)
- .SetResultTransformer(CriteriaUtil.DistinctRootEntity)
- .SetMaxResults(20)
- .List<Recipe>();
Add Comment
Please, Sign In to add comment