← Back to team overview

mugle-dev team mailing list archive

Re: Mapping the ER diagram to java classes

 

On Wed, 2011-02-09 at 12:24 +1100, Scott Ritchie wrote:
> Having looked at both, they seem fairly similar in terms of notation
> and what we're trying to achieve.   The only downside i can see to JPA
> is it doesnt support Many-Many relationships, whereas JPO does
> (allowing us to cut out UserTeamRelation if we want).    

Aye. I had a bit of a closer look around last night and did some
research. JDO is the older standard that was donated to the Apache
project by Sun. It seems to be a little better suited for App Engine
since it's not constrained to using a RDBMS (it can use a variety of
stores).

JPA is the newer standard and there are some politics behind it's
formation (Certain RDBMS providers didn't like the idea of being
completely decoupled from their systems?). Systems like Hibernate have a
JPA provider in addition to their own built in API. App Engine uses
DataNucleus provider that allows both JPA and JDO on App Engine but
there are some limitations due to the underlying data store not being a
RDBMS (See
http://code.google.com/appengine/docs/java/datastore/jpa/overview.html#Unsupported_Features_of_JPA ).

I'd be surprised if JPA can't do Many-Many in some form (even if it is
deconstructed to a pair of 1-Many).

Here seems to be a reasonable good overview of how you map classes with
JDO -
http://www.datanucleus.org/products/accessplatform/jdo/class_mapping.html . There's also an equivalent guide for JPA.

Some more general links:
http://www.datanucleus.org/products/accessplatform/jdo_jpa_faq.html
http://db.apache.org/jdo/jdo_v_jpa.html
http://stackoverflow.com/search?q=JDO+JPA

Cheers,
David



Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References