代碼內(nèi)容select mate from Cat as cat inner join cat.mate as mate 該語句將選擇mates of other Cats。代碼內(nèi)容select distinct cat.name from Cat cat select count(distinct cat.name), count(cat) from Cat cat.代碼內(nèi)容from Cat cat, Cat rival where cat.mate = rival.mate select cat, mate from Cat cat, Cat mate where cat.mate = mate 特殊屬性(小寫)id可以用來表示一個(gè)對(duì)象的唯一的標(biāo)識(shí)符。
幸運(yùn)的是,Hibernate為我們提供了一種語法類似于SQL的語言,Hibernate查詢語言(HQL),和SQL不同的是,HQL是一種面向?qū)ο蟮牟樵冋Z言,它可以查詢以對(duì)象形式存在的數(shù)據(jù)。select count(p) from Product p having p.price < avg(amount) group by p.id 從上面的一系列的HQL語句可以看出,所有通過SQL實(shí)現(xiàn)的,都可以通過HQL來實(shí)現(xiàn)。1. HQL并不區(qū)分字母的大小寫,但在HQL中的Java類和屬性名必須和實(shí)際的類和屬性名一致。
Methods GET and POST in HTML forms - what‘s the difference?
http://www.ahfyzs.com/content/07/0117/11/15540_334209.shtml
2007/2/5 15:01:54
Methods GET and POST in HTML forms - what‘s the difference?Thus, for a query where the keywords might contain e.g. accented letters, you have to select among two evils: using METHOD="GET" against the rules which restrict the character reportoire to ASCII within it, or using METHOD="POST" against the rules which says that it should not be used when the processing is idempotent.