Voyage: Circular references
Posted by Sabine M. on Jul 18, 2013; 3:07pm
URL: https://forum.world.st/Voyage-Circular-references-tp4691940p4699412.html
Hi,
I was working for a while with Mongotalk and started with Voyage today.
I run in exactly the same problem as Bernat. Image non responding.
I tried the star/planet example and it worked. hmpf.
When I debugged into, I recognized that I did not tell Voyage at which "model bounds" to stop when creating the json.
I have to explain this.
I have Persons and Trips. One person can have many trips, one trip belongs to exactly one person.
But my trips also have e.g. associations to Countries. I do not want Voayge to put the whole country instance in the json of the trip but only a key (e.g. #germany) for getting the country instance back when loading the trip. Currently, Voyage is trying to put all the stuff in the json, also currencies etc.
I am not sure if the image is hanging because of this reason.
So, my question is how to tell voyage which attributes NOT to put completely into the json but only a key.
Sabine