成都网站建设设计

将想法与焦点和您一起共享

Hibernate新项目诞生,谓之OGM

Hibernate 团队对外宣布了一个新的家族成员,Hibernate OGM, OGM 是 Object Grid Mapping的缩写,它的目标是试图使用 JPA 来操作 NoSQL数据库,目前似乎局限于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 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的存储技术方面,还不能相提并论,DataNucleus支持JDO,JPA标准,支持目前几乎所有的流行的存储方式,Google的APPEngine也是基于DataNucleus的。

以下是对特性的翻译,请指正:

  • 支持实体CRUD操作
  • 支持简单(JDK)类型的属性
  • 支持嵌入式对象
  • 支持实体层次结构
  • 支持标识符生成器(现在的表和基于记忆的生成器)
  • 支持乐观锁
  • 支持@多对一,@一对一,@一对多,@多对多关联
  • 支持双向关联
  • 支持数组,列表和图形集合
  • 支持最多的Hibernate原始APIs (like Session)和JPA APIs (like EntityManager)
  • 支持在JPA或者Hibernate Core中,同样的引导模式发现:in JPA, set to org.hibernate.ogm.jpa.HibernateOgmPersistence and you're good to go

网站栏目:Hibernate新项目诞生,谓之OGM
本文地址:https://chengdu.cdxwcx.cn/article/djdojgo.html