[OJB-developers] Question about Identity
Brought to you by:
thma
From: Georg S. <ge...@me...> - 2002-05-10 16:46:21
|
Hi, I have been thinking about the following for a while, but I don't seem to understand it. Why is it necessary for the Identity objects to store the class of the extent it is contained in, instead of the class of the object itself. // identities must be unique accross extents ! this.objectsClass = broker.getExtentClass(objectToIdentitify.getClass()); The reason I am asking this, is that when one is loading an object by its identity, which forms part of an extent with lots of concrete classes, there is a lookup in each of the concrete classes tables (until the object is found), which can take quite a bit of time. If for some reason the "extent-Identity" is necessary (it probably is, but I am too tired to see it) wouldn't it be a good idea to include a further field in Identity which holds the concrete class and can then be used to directly home in on the right table in the getDBObject method in PersistenceBrokerImpl. Thanks for your help in advance Georg |