Hi,
I have a Django model created for Google's App Engine,
Model A():
propA = ReferenceProperty(B)
Model B():
propB = ReferenceProperty(C)
Model C():
propC = ReferenceProperty(B)
I have written custom Django serializer which will fetch the data for the ReferenceProperty(s) and serialize that along the initial model.
The problem occurs when I try to serialize an instance of Model A. My custom serializer will try to get propA, which contains a reference to Model C so the serializer will fetch Model C, which contains a reference to Model B and the recursion goes on and on. Is there any way to stop the recursion after a depth of say 2??
My serializer is a customized version of link text
P.S: I am willing to publish my code if that seems to needed. I have not currently attached the code since I am not at my development machine.
Thanks,
Arun Shanker Prasad.