You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Peter Wieland <pe...@armax.de> on 2004/07/08 11:31:15 UTC

Cache and Inheritance

Hi all,

I have the following scenario: 

<<interface>> TextLinkable (0..*)---(0..1) TextModule

And a class Product implementing TextLinkable (Product is declared as
extent of TextLinkable in repository).

It now appears that I have different instances of the same Product in my
App which is not what I expect. Normally the use of a cache makes sure
that persistent identity is equivalent to java identity (which works
fine in most cases). I suppose that the cache does not correctly resolve
identities when inheritance comes in to play. 

The TextModule class holds a dynamic proxy for the associated
TextLinkable. Is it possible, that, when materializing this proxy, it
does not find an existing Product (which would be the real object in
this case) in the cache, because the cache is searched for classes of
runtime type TextLinkable (there are none, as TextLinkable is an
interface)?

I observed the problem with OJB RC5. Is this a known problem? Anybody
knows whether it is fixed in 1.0?

Thanks for any help.

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org