hi,

I have this model which doesn't work when using select_related(). What
happen is django seems to be in a infinite loop.

class Employee(models.Model):

    employee_contract = models.ForeignKey('EmployeeContract',
related_name='contracted_employee')
    employee_assignment = models.ForeignKey('EmployeeAssignment',
related_name='assigned_employee')

class EmployeeAssignment(models.Model):
    employee = models.ForeignKey(Employee)
    assignment_from = models.DateField()
    assignment_to = models.DateField()
    area = models.CharField(maxlength=3, choices=AREA_LIST)
    position = models.CharField(maxlength=20)
    edit_by = models.ForeignKey(Profile, null=True)

class EmployeeContract(models.Model):
    employee = models.ForeignKey(Employee)
    contract_to = models.DateField()
    contract_from = models.DateField()
    notes = models.CharField(blank=True, maxlength=200)
    status = models.CharField(maxlength=3,
choices=EMPLOYEE_CONTRACT_STATUS_LIST)
    edit_by = models.ForeignKey(Profile, null=True)

Thanks
james


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to