{ok,P} = ((boss_db:find(Id)):set(id,id)):save().

On Wednesday, May 14, 2014 5:41:36 AM UTC+4, Jesse Gumm wrote:
>
> 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] <javascript:>> 
> 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] <javascript:>. 
> > 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/7f17f580-201c-4b7c-96a3-04dbb1c5dbff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to