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
