论坛首页 Java版 Hibernate

[转贴]Opinion: Redesigning "Query by Criteria" in

浏览 2953 次
该帖已经被评为精华帖
作者 正文
时间:2003-12-04
Gavin and the Hibernate are looking into what makes a great "Query by Criteria" design. Wrapping an OO model on top of SQL is tough, and this piece walks through various design choices. It is always interesting to watch thought progression such as this.

Gavin ends up "considering supporting something like the following in Hibernate":

session.createCriteria(Project.class)
.createDisjunction()
.add( eq("name", "Hibernate") )
.add( like("description", "%ORM%") )
.list();

Do you have any thoughts? Has anyone worked with a great Query by Criteria API that they loved? Are you someone who would rather just do it in SQL?



http://www.theserverside.com/home/thread.jsp?thread_id=22712
   
论坛首页 Java版 Hibernate

跳转论坛:
JavaEye推荐