openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Clarify ObjectID and OpenJPAObjectID
Date Tue, 08 Apr 2008 19:44:57 GMT

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?


View raw message