Hi Amit,

You can copy the record and make a new one byc

PersonRec = boss_db:find(Id),
NewPerson = PersonRec:set(id, id),
NewPerson:save().

Hope that helps,

-Jesse


On Tue, May 13, 2014 at 6:52 AM,  <[email protected]> wrote:
>
>
> Hello there,
>
> I have the model:
>   -module(person, [Id, Name, DateOfBirth]).
>
> If I have id of one person
>
> PersonRec = boss_db:find(Id)
>
> then I want to copy PersonRec with new unique id and save it to the
> database.
>
> I am using mongodb.
>
> Is there any in-built function in chicago boss ?
>
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/5d04d410-e41e-483e-972b-b07165f2e7a7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/CAPTXyXdUaz4qRdaXucCUvDrKydF9pX3o0-cmEvVb9ZJjyu%2BjoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to