simply ? Thanks ;-)
2014-04-17 10:42 GMT+02:00 Esteban Lorenzano <estebanlm@gmail.com>:
+1
On 17 Apr 2014, at 10:17, Norbert Hartl <norbert@hartl.name> wrote:
>
> Am 17.04.2014 um 10:08 schrieb Olivier Auverlot <olivier.auverlot@gmail.com>:
>
>> Hi,
>>
>> I'm using Voyage and I need to duplicate an existing document in a Mongo database. I suppose that the id must be changed before saving.
>>
>> What is the best way to do that ?
>>
> If you need a shallow copy then you better just copy the object and store it. Changing the id is asking for trouble I guess. That would probably work if you implement #= on those objects but I think it is a hack.
>
> anObject copy save
>
> should do.
>
> Norbert
>
>