db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg von Frantzius <joerg.von.frantz...@artnology.com>
Subject How to avoid PM.getObjectById() checking for correct class in datastore?
Date Tue, 22 Jul 2008 15:13:54 GMT
Hi,

when calling PersistenceManager.getObjectById() with a 
SingleFieldIdentity, there seems to be no way of avoiding the following 
(if the implementation decides to do so):

"It is an implementation decision whether to access the data store, if 
required to determine the exact class. This will be the case of 
inheritance, where multiple <code>PersistenceCapable</code> classes 
share the same ObjectId class."

Now when I know for sure that the targetClassName of the given 
SingleFieldIdentity already denotes the correct class for the given id, 
how can I avoid that additional roundtrip to the database for finding 
the exact class?

Maybe it would be useful to have another

Object getObjectById (Object oid, boolean validate, boolean 
determineExactClassInDatastore);

on PersistenceManager for that purpose?

Regards,
Jörg

-- 
____________________________________________________________________
artnology GmbH - Milastraße 4 - 10437 Berlin - Germany
Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 
UST-Id. DE 217652550


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message