Domanda

I already have some experience with Hibernate but, if I'm correct, there's no way to use it to access object databases like Versant's VOD. Since they just released a preview with JPA support I was wondering if I can use my limited Hibernate skills to use the object database with JPA. If anybody has experience with please let me know if these versions are compatible.

Best.

Harry

È stato utile?

Soluzione

Let me put a disclaimer first: I'm one of the developers of Versant JPA.

To work with Versant JPA it should be sufficient to have basic JPA skills.

We provide a tutorial which should run out of the box after you have installed the "Versant JPA" Technical Preview and the supplied Eclipse plug-in. Just have a look into this and the provided "Getting Started with Versant JPA" manual to get the first impressions how easy to use it is.

I disagree with some statements from DataNucleus: Yes, Versant is an ODBMS and not an RDBMS, thus we ignore anything which is just specific to mapping - your Java data model is virtually the same as the data model in the Versant database. However apart from all mapping related stuff, JPA is a natural API for an object database as well. I disagree, that there is a big correlation between the design of JPQL and the fact, that JPA was designed with RDBMS in mind. (Actually Microsoft has proven this by abstracting LINQ to a datastore agnostic level.)

All the big differences between Versant JPA and RDBMS based JPA implementations are described in a separate chapter in our "Getting Started with JPA" guide. The biggest one might be our restriction, to have an @Id field of type "long" or "java.lang.Long", which is automatically set by our runtime.

We do also have a JDO implementation, but I would recommend to try out our Versant JPA technical preview (as the term "preview" suggests, it is not feature complete yet).

Christian Romberg

Altri suggerimenti

Why would you need Hibernate if you're using an object database? Hibernate is an ORM tool, which stands for object-relational mapping. If you're not using a relational database, what's Hibernate for?

Here's an ODB that claims to work with JPA; maybe you can adapt or follow suit with Versant's VOD.

You don't use any "Hibernate skills" with a different piece of software; you use you JPA skills. It's a standard API, hence same classes with same metadata, and same persistence code. The only thing different is you may have some different persistence properties to use in your persistence.xml.

Needless to say, JPA was designed around RDBMS only, and various parts (particularly JPQL) are clearly not as applicable to an ODBMS, hence it is not as suitable an API as you may wish to have for that datastore, and something like JDO would be more suited (which VOD also supports IIRC) ... but anyway

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top