On Fri, Nov 13, 2009 at 7:45 AM, Georg Schölly <[email protected]>wrote:
> Hello, > > I tried copying a storm object using the built-in copy module. This > didn't work because it copied all the internal storm details of the > object too, which resulted in two objects having the same primary key. > After commit one of the objects was overwritten. > > Is there already a functionality in storm to make copies of objects? > > If not, is there any reason one couldn't / shouldn't include a > __copy__ method in the storm.base.Storm object? Any interest in having > such a method? > The problem that I see is that this may be one of those "in the face of ambiguity, resist the temptation to guess" situations. What does it really mean to copy an object? Are you wanting to insert the same row twice? Are you wanting to insert it into a database? Are you trying to do something else? I've seen all three situations come up. Now that said, I do believe that you're bringing up a good point. In particular, it would be nice if there were a way for storm to disassociate an object from its store and/or reset any metadata associated with the object. There are times where I will want to insert an object from one store into a different store. And I feel like that would solve your issue.
-- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
