You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Fr...@capgroup.com on 2008/04/08 21:44:57 UTC

Clarify ObjectID and OpenJPAObjectID

Can someone help me make sure I understand the difference between ObjectID
and OpenJPAObjectID?

ObjectID is returned from
Object objId = OpenJPAPersistence.getEntityManager(o).getObjectId(o);

And OpenJPAObjectID is returned from
Object openJPAId =
JPAFacadeHelper.toOpenJPAObjectId(JPAFacadeHelper.getMetaData(o), objId);

So far it seems to me that the ObjectID is used by the persistence layer
(OR Mapping part of OpenJPA).
And that OpenJPAId is used by the DataCache layer of OpenJPA.

Is this correct?

Do we really need both?

Frederic