#5599: Cannot save value via OneToOneField
---------------------------------------+------------------------------------
Reporter: baumer1122 | Owner: nobody
Status: closed | Milestone:
Component: Database wrapper | Version: SVN
Resolution: invalid | Keywords: onetoone
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
---------------------------------------+------------------------------------
Comment (by ubernostrum):
Replying to [comment:6 Vadim Fint <[EMAIL PROTECTED]>]:
> Replying to [comment:5 jacob]:
> > Yeah, setting attributes on related objects doesn't automatically save
them; this'll happen with an FK or M2M, too. You need to do something
like:
>
> This is confusing me a little. Why did such design decision was choosen?
It's consistent; Django doesn't push changes to an object's field values
down to your DB until you call `save()`; this is the case with any field
type, and is generally considered useful because it means that you don't
end up doing a hit to your DB every time you assign to an attribute.
--
Ticket URL: <http://code.djangoproject.com/ticket/5599#comment:7>
Django Code <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
-~----------~----~----~----~------~----~------~--~---