[OJB-developers] bug in CollectionProxy
Brought to you by:
thma
From: Georg S. <ge...@me...> - 2002-04-29 16:51:40
|
Hi Thomas, CollectionProxy takes in a PersistenceBroker when being constructed, which isn't actually necessary, because a new one is requested from the factory if the field is null. The problem is that in PersistenceBrokerImpl the this-pointer is handed over at construction time: if (lazy) return new CollectionProxy(collectionClass, this, query); which means that one Broker-Instance is now available at different places and screws up things badly. Since it isn't necessary (see above) I just commented out the following line in the CollectionProxy-Constructor: public CollectionProxy(Class aCollClass, PersistenceBroker aBroker, Query aQuery) { setCollectionClass(aCollClass); //setBroker(aBroker); setQuery(aQuery); calculateSize(); } Cheers Georg |