Hi all, Can anyone suggest a way around the following with OJB? I have a class A which contains a Collection of Bs. This Collection could be very large (in the tens of thousands), so the obvious solution is to use proxies. However there is no point in defining the class descriptor for B to be a proxy because I don't want Bs to *always* be proxied - I only want them proxied *in the context of being inside a Collection within an A*. Equally I do not want the Collection itself to be proxied as I want lazy access to elements, so a Collection of proxies is better.
I can't spot anything in the DTD which allows me to specify proxies only within the context of elements inside a Collection - the only option seems to be to declare the class descriptor as a proxy in all cases. There is something close to what I want by declaring references as proxied, but not for Collections. Is there a way to do this in OJB? I have a related issue too, which may or may not be a bug. When I have declared a class (say B) as proxied and then access it via a reference descriptor of another class (say class C), I get back the Proxy type but the call to its hashcode throws a NPE, presumably because the object itself has not been materialized by the proxy even though the code delegates this to VirtualProxy. If instead in the class descriptor for C I declare the reference type to B to be the *interface* that B and also the proxy implement, I get null back instead! Any help on that one? Cheers, Chris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
