The document is out-dated. Object reloading is removed, because there is a
lot of pitfall.
A real inheritance mechanism is going to implemented. It going to take a
while...
Please point me to the document, so that I can update it.
Thanks,
Thomas
-----Original Message-----
>From: Adam Esterline [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 31, 2001 1:56 PM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] JDO Inheritance Bug
>
>Has anyone been experiencing any problems with inheritance in Castor JDO?
>
>I have attached my two classes and my map file. The two classes are
>Category and SuperCategory. I know that it sounds funny, but
SuperCategory
>extends Category. Category extends BaseJDO which implements Persistent
and
>TimeStampable. In Category, I override jdoLoad to check and see if class
>being loaded is really a SuperCategory (just like the Product-Computer
>example). Every time a Category gets loaded even if a SuperCategory
>should be loaded.
>
>I have looked around in the Castor JDO source and I have found out some
>interesting things. I looked for all instances of CallbackInterceptor,
>since I am assuming that this is how the TransactionContext communicates
>with the Persistent object. In my searching I only found two places where
>the CallbackInterceptor's loaded method was called. Here they are:
>
>Around Line 600 in org.exolab.castor.persist.TransactionContext
>
>if ( _callback != null ) {
> _callback.using( object, _db );
> _callback.loaded( object, toDatabaseAccessMode( accessMode ) );
>} else if ( molder.getCallback() != null ) {
> molder.getCallback().using( object, _db );
> molder.getCallback().loaded( object, toDatabaseAccessMode( accessMode )
>);
>}
>
>It does not look like in either call to the loaded method is being checked
>to see if Class instance is being returned. According to the
documentation
>in the Persistent interface:
>
>Returns:
>null or the extending Class. In the latter case Castor will reload the
>object of the given class with the same identity
>
>Am I missing something? I tried fiddling around with it, but I don't know
>enough about the Castor to make it work. I sure what I was doing was not
>very good work. Has anyone else had this sort of problem?
>
>Any insight would be helpful.
>
>Adam
>
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev