Hibernate新項目誕生,謂之OGM
Hibernate 團隊對外宣布了一個新的家族成員,Hibernate OGM, OGM 是 Object Grid Mapping的縮寫,它的目標是試圖使用 JPA 來操作 NoSQL數(shù)據(jù)庫,目前似乎局限于Infinispan 。
目前支持的特性:
- CRUD operations for entities
- properties with simple (JDK) types
- embeddable objects
- entity hierarchy
- identifier generators (TABLE and all in-memory based generators today)
- optimistic locking
- @ManyToOne, @OneToOne, @OneToMany and @ManyToMany associations
- bi-directional associations
- Set, List and Map support for collections
- most Hibernate native APIs (like Session) and JPA APIs (like EntityManager)
- same bootstrap model found in JPA or Hibernate Core: in JPA, set <provider> to org.hibernate.ogm.jpa.HibernateOgmPersistence and you're good to go
下載:http://www.hibernate.org/subprojects/ogm/download
參考手冊:http://docs.jboss.org/hibernate/ogm/3.0/reference/en-US/html_single/
PS:從目前情況看,不支持流行的 MongoDB 等等。與DataNucleus(http://www.datanucleus.org) 在Backend的存儲技術(shù)方面,還不能相提并論,DataNucleus支持JDO,JPA標準,支持目前幾乎所有的流行的存儲方式,Google的APPEngine也是基于DataNucleus的。
以下是51CTO對特性的翻譯,請指正:
- 支持實體CRUD操作
- 支持簡單(JDK)類型的屬性
- 支持嵌入式對象
- 支持實體層次結(jié)構(gòu)
- 支持標識符生成器(現(xiàn)在的表和基于記憶的生成器)
- 支持樂觀鎖
- 支持@多對一,@一對一,@一對多,@多對多關(guān)聯(lián)
- 支持雙向關(guān)聯(lián)
- 支持數(shù)組,列表和圖形集合
- 支持最多的Hibernate原始APIs (like Session)和JPA APIs (like EntityManager)
- 支持在JPA或者Hibernate Core中,同樣的引導(dǎo)模式發(fā)現(xiàn):in JPA, set <provider> to org.hibernate.ogm.jpa.HibernateOgmPersistence and you're good to go
【編輯推薦】
- 三大框架Struts2+Spring2.5+Hibernate3.5的整合開發(fā)
- Struts2.1.6的環(huán)境搭建與示例
- iBATIS Spring Struts2整合實例淺析
- Struts+WebWork簡單示例
- Struts2對WebWork的改進