Saturday 22 April 2017

implementing clone in mean stack with multilevels

I have mean stack based web application I have a heirarchical structure like University--> College --> Department --> Class-->Students.. [this is just a scenario..not real data].. schema in mogoose is designed like every top collection will contain ids of sub collection..Department will have id's of the classes..classes will have id's of each student Now client asked for a feature where by they can clone data... Like they can clone University and create another university.. so i have to insert the same data for every collection/sub collection with a new id and link each of the id's of the sub collection in parent collection.. so it will become so much round trip to db to create each structure.. What is the best way to address this?any good approaches are welcomes



via Jocket

No comments:

Post a Comment