classinheritancedevexpressextendxpo

DevExpress XPO Table Extend and common column persistent


I am developing an Application using DevExpress XPO which has PostgreSQL database. I have a class OrderBase and and another class OrderDetails which extends OrderBase. OrderBase has a column modified_at which is capturing the last modification data as timestamp.

The table 'OrderBase' into PostgreSQL has the field modified_at but the table 'OrderDetails' into PostgreSQL does not have this field.

Is there any easy way to have this column physically into the database on table 'OrderDetails' just like table 'OrderBase'? Column should be updated to in both classes/tables.

I tried already to set the column name as field into 'OrderDetails' class but ofcourse is impossible as the field exists in the class which extends.


Solution

  • There is a nice functionality while posting to access the UnitOfWork and iterate though it to update also the column which is needed even the column belongs to a table which is extended of another table.

    So in this case we can update 'OrderDetails' though 'OrderBase' though UnitOfWork iteration.