Changes between Initial Version and Version 2 of Ticket #16356


Ignore:
Timestamp:
09/26/2016 10:15:58 AM (3 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16356

    • Property Status changed from new to closed
    • Property Resolution changed from to invalid
  • Ticket #16356 – Description

    initial v2  
    66
    77The classes would be:
    8 
     8{{{
    99class Owner(models.Model):
    1010    address = models.ForeignKey(Address)
     
    2020    street = models.CharField(max_length=100)
    2121    number = models.IntegerField(default=0)
    22 
     22}}}
    2323
    2424This is the correct mapping following the logic of object-orientation, but this mapping does not allow remove related objects by CASCADE.
    2525According to the Django doc, the mapping is inverse:
    26 
     26{{{
    2727class Owner(models.Model):
    2828    #other fields
     
    3636    owner = models.ForeignKey(Owner)
    3737    house = models.ForeignKey(House)
    38 
     38}}}
    3939
    4040The big problem is that this mapping in the form of owner the address form is shown with a select of houses, and in the form of owner is shown a form address with a select of owners.
Back to Top