Computed Columns

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Computed Columns

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

I think existing code will not break as database engines don't allow updates to computed columns.

Sandeep
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

I have logged about this in Bug tracker.

Sandeep
Post Reply