title: Resolving a three-way circular reference in SQL (Django)
body: <p>Currently I have three models in Django that create a circular reference:</p>
  
  <p>A <code>User</code> can live in a <code>Location</code>.
  A <code>Location</code> must be part of a <code>Property</code>.
  A <code>Property</code> must have an owner, which is a <code>User</code>.</p>
  
  <p>The reason I want each <code>User</code> to specify a location is for people living in apartments. An apartment tenant would live in a numbered room, but a house tenant wouldn't. But notice that location can also simply be just a property (ie a house tenant lives in a location which is just the property with an address; the property doesn't have room numbers, floors, or buildings.).</p>
  
  <p>Here is the (stripped down) code:</p>
  
  <pre><code>class User( models.Model ) :
      TYPE_CHOICES = (
          ( 't', 'tenant'           ),
          ( 'o', 'property owner'   ),
          ( 'v', 'vendor'           ),
          ( 'm', 'property manager' ),
      )
  
      user_type  = models.CharField( max_length = 1, choices = TYPE_CHOICES, default = 't' )
      first_name = models.CharField( max_length = 135 )
      last_name  = models.CharField( max_length = 135 )
      location   = models.ForeignKey( Location, null = True, blank = True )
  
  class Property( models.Model ) :
      name             = models.CharField( max_length = 135 )
      owner            = models.ForeignKey( User )
      address_line_one = models.CharField( max_length = 135 )
      address_line_two = models.CharField( max_length = 135, blank = True )
      city             = models.CharField( max_length = 135 )
      state            = models.CharField( max_length = 135 )
      zip_code         = models.CharField( max_length = 135 )
  
  class Location( models.Model ) :
      room       = models.CharField( max_length = 135, blank = True )
      floor      = models.CharField( max_length = 135, blank = True )
      building   = models.CharField( max_length = 135, blank = True )
      prop       = models.ForeignKey( Property )
  </code></pre>
  
  <p>Please let me know if you guys need more clarification or code. Thanks in advance!</p>