Stránka 11

Inheritance of classes with columns with a same code

PříspěvekNapsal: ned 06. pro 2015 11:00:25
od andesys
(Translated from another language)
If I have two classes when the second one inherits from the first one, can I have in both the classes a column with the same code? How will be these properties used in scripts?

Re: Inheritance of classes with columns with a same code

PříspěvekNapsal: ned 06. pro 2015 11:00:45
od andesys
Yes, uniqueness is required within a single class. When accessing the column from a script you distinguish:
1) If the column is from the class, for which the record is read, then use a normal access: dr['name'] = ...
2) if the column is from a parent class, use adapted access: dr['parent_class_code.name'] = ...