#15586: Field populated when no DB column present
-----------------------------------------+----------------------
               Reporter:  sebzur         |        Owner:  nobody
                 Status:  closed         |    Milestone:
              Component:  Uncategorized  |      Version:  1.2
             Resolution:  wontfix        |     Keywords:
           Triage Stage:  Unreviewed     |    Has patch:  0
    Needs documentation:  0              |  Needs tests:  0
Patch needs improvement:  0              |
-----------------------------------------+----------------------
Changes (by ramiro):

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


Comment:

 I t is not completely clear to me what is the behavior you expect here.

 If what you are suggesting is that Django flags the divergence between the
 model design and its corresponding database table structure as soon as
 possible (e.g. at Python model field population time) it would be a waste
 of resources (it would need to introspect the DB table every time). IMHO
 current behavior is a good compromise: Let the DB-API driver/database
 engine to flag the error when actual interaction with the DB is performed.
 Remember, we are using a RDBMS plus an ORM, not a OODB, there are two
 separate realms, the model objects one and the database one.

 If what you are asking for is database schema evolution so it follows the
 model design, it is a feature that hopefully will be added in a future
 version and there are third party tools that implement that now (but AFAIK
 none of them perform ''automatic'' schema evolution so they won't be of
 help in cases where the developer wants to get away with changing the
 model design at will and hoping the software will take care of the
 database changes).

 See also http://docs.djangoproject.com/en/1.2/faq/models/#if-i-make-
 changes-to-a-model-how-do-i-update-the-database

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15586#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