Greetings All,

In the firebird backend for django, it has been noticed that if a
legacy DB model contains a COMPUTED BY field, INSERTs and UPDATEs will
fail on that model - because firebird itself rejects any attempt to
update that field.

(for example, a field is defined in DDL as: FULL_NAME COMPUTED BY
(FNAME||' '||LNAME)); - and the concatenation of the fname field, a
single space, and the lname is performed at the database - not the
client)

Therefore, the SQL generated by django needs to have this kind of
field removed before the query is executed. I was thinking that the
cleanest way to this would be to have a new kind of field option -
"readonly" or "computed" - that marks these fields to be ignored in
write operations but included in read operations. In addition this
would also potentially allow for the definition of the COMPUTED BY
operations to be created by django in the model. (ie generate the DDL
required and install it in the DB)

Do other databases have this problem too? Is there already a method of
doing this?

Thanks for a great framework btw.

Patrick

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

Reply via email to