this is a known problem. Currently caching is not very sophisticated, but we will start to implement a really smart two level cache in near future. This new cache implementation should solve most known problems.
Currently the user have to take care of a consistent cache.
regards, Armin
On Tue, 14 Oct 2003 15:23:36 +0200, <[EMAIL PROTECTED]> wrote:
Hi,
I ran into a problem with implementing the collection attribute for a 1:n mapping:
Since I didn't want to "polute" my persistent objects with any ODMG or
even OJB specific imports, I just initialized my collection attributes (of
type java.util.List) with ArrayLists when needed. This worked fine as long
I was using a ObjectCachePerBrokerImpl cache, because when the transaction
that created the object committed, the cache was cleared. So the next time
the object was accessed, it was read fresh from the database and OJB set
the collection attribute to a RemovalAwareCollection (or whatever the
class descriptor specified).
Now I'm trying to use a ObjectCacheDefaultImpl -- with the result that the
new object is still cached when I access it again, and still has the
ArrayList as List implementor of the collection attribute. The consequence
is that removing entries from the List does not work, because OJB never
gets notified of the removal.
Who knows a way to initialize collection attributes with the proper OJB collection classes without making the object model dependent on OJB? Thanks for any hints!
Gerhard
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
