Page 1 of 1

Computed Columns

Posted: 24.03.2008, 05:42
by sandeep_c24
Currently Zeos allows computed columns to be edited but an exception is raised as soon as the record is posted. Should computed columns be marked as read-only?

Sandeep

Posted: 25.03.2008, 00:14
by mdaems
This reasoning seems logical.
2 remarks :
  • How about existing code
  • Isn't this kind of errors caused by the compiler instead of the zeos library? I remember the 'autoincrement' column problem which was caused by a standard Delphi Dataset behavior.
Mark

Posted: 25.03.2008, 07:49
by sandeep_c24
I think existing code will not break as database engines don't allow updates to computed columns.

Sandeep

Posted: 25.03.2008, 08:37
by mdaems
I agree... as far as setting these readonly property to true doesn't influence the behavior of queries with an attached TZUpdateSQL object. Because in these queries you could enable updates of Calculated fields.
Do you have a patch sugestion?
Please log an issue in the bug tracker, so we don't forget about it.

Mark

Posted: 26.03.2008, 07:32
by sandeep_c24
I have logged about this in Bug tracker.

Sandeep