《深入淺出Hibernate》實在是本好書
今天說一下屬性查詢
List list = session
Iterator it = erator();
while(it
Object[] results = (Object[])it
System
System
}
如果覺得返回數組的方式不夠符合面向對象的風格
List list = this
Iterator if = erator();
while(it
TUser user = (TUser)it
System
}
著愛與那個就比較形象化一些
while(it
TUser user = (TUser)it
user
session
}
也可以使用像 SQL 那樣的統計函數
selet count(*)
select upper(user
select distinct user
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28047.html