« Return to Thread: Self Reference Issues with PyAMF 0.4.2 and Django

Self Reference Issues with PyAMF 0.4.2 and Django

by Mayeul Rousselet-2 :: Rate this Message:

Reply to Author | View in Thread

Hi,

I encounter the following issue :
In Django, I have a File model which reference itself :

class File(models.Model):
     ...
     parent = models.ForeignKey('self',null=True,blank=True)
     ....

I try to send two File instance to Flex with the relationnships:
parent = File(name="Parent")
child = File(name="Child",parent=parent)

When I retrieve my File objects in Flex, the self references are wrong:
child.parent has a different memory address (therefore is a different object) than parent

Any idea?

thank you very much

Mayeul

_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

 « Return to Thread: Self Reference Issues with PyAMF 0.4.2 and Django