ERLB Clone

ERLB Clone

Old forum URL: forums.lhotka.net/forums/t/4344.aspx


stanc posted on Thursday, February 14, 2008

Has anyone created a Clone method on their sub-class of ERLB? I am using a hashtable to do some caching on the client side, but this requires me to use a clone of the object and ERLB is not cloneable. I basically write the object to the hashtable on the fetch, using the criteria and object type as a key. Before fetching new data I check the cache, and return a clone if it is found. Otherwise, I make my dataportal call, added it the hashtable, and return a clone. This obviously cannot work for ERLB objects. 

In any case I would be interested in seeing if anyone has implemented ICloneable in the ERLB.

I would also be interested on your thoughts related to caching.

Thanks

Stan

stanc replied on Thursday, February 14, 2008

FYI

I chose to just implement the Clone function found in in ObjectCloner. So, instead of calling the Clone method on the object, I just pass the object to the Public shared clone function before return in from the cache. This eliminated the need to implement the ICloneable interface on the ERLB.

Copyright (c) Marimer LLC