#15586: Field populated when no DB column present
---------------------------+---------------------------
 Reporter:  sebzur         |         Owner:  nobody
   Status:  new            |     Milestone:
Component:  Uncategorized  |       Version:  1.2
 Keywords:                 |  Triage Stage:  Unreviewed
Has patch:  0              |
---------------------------+---------------------------
 With PostgreSQL as backend, when I use CharField field and name it "name",
 i.e.:

 {{{
 #!python
 class MyModel(models.Model):
    name = models.CharField(max_length=255, ....)
 }}}

 I can reference to a 'name' field even though the appropriate db column is
 missing... (I forgot to create it
 manually that's how I've noticed that strange issue)

 The issue went out when I updated the model (no 'name' field before), I
 did not create a DB column, but that did not
 stop Django from filling the field with a value! On .save() everything is
 OK and expected DatabseError
 exception is raised by psycopg2.

 The value stored in the field looks like a tuple, namely its: '(A, B, C)'
 where A-C are integers.

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