#12556: Django should not reset all parent model field values when saving child
model with existing parent
---------------------------------------------------+------------------------
          Reporter:  parxier                       |         Owner:  nobody
            Status:  closed                        |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.1   
        Resolution:  invalid                       |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm not convinced this is legitimate usage. There all comes down to the
 "composition vs inheritance" debate. To my reading, what you're trying to
 do shouldn't be possible, as an object can't be both a Restaurant *and* a
 RentedProperty. However, if you were to use composition (i.e., define a
 OneToOneField), then you can interrogate the Restauarant aspects and the
 RentedProperty aspects of a single Property object.

 If you must use inheritance, there are ways you can fake what you're
 trying to do with raw saving (which won't save the parent class
 attributes), but I'm not convinced that's what the API should be doing by
 default.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12556#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

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

Reply via email to