Hello!
I'm using OJB 0.9.5.
I think it is needed to refresh cld after loading object in
getDBObject(Identity oid).
Part of code ( coment inside):
synchronized(newObj)
{
// cache object immediately , so that references
// can be established from referenced Objects back to this Object
objectCache.cache(oid, newObj);
//MY PART:
//Refresh class descriptor.
//Why? Example: Extents hierarchy like: c1->c2->c3, if c2 instance is
successfully
//loaded, cld will be descriptor for c2,
//after materialization we will know the real class ( c3 ), so when
retrieving
//references we should get cld for class c3.
//by Alexey Snisarenko
Class c1 = oid.getObjectsRealClass();
if (c1 == null)
{
c1 = oid.getObjectsClass();
}
cld = getClassDescriptor( oid.getObjectsRealClass() );
//END OF MY PART
// 2. retrieve non-skalar fields that contain objects retrievable from
other tables
retrieveReferences(newObj, cld);
// 3. retrieve collection fields from foreign-key related tables:
retrieveCollections(newObj, cld);
}
PS: Something wrong with web interface to mailing list:
"VelocityServlet : Error processing the template"
PPS: is 0.9.5 supported or commits will be only in MAIN branch?
Thank you.
Best regards,
Andrey Chernyh<[EMAIL PROTECTED]>
Plesk Inc.
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>