[odb-users] Unique index in abstract class

Патрушев Данил Андреевич d.patrushev at prosoftsystems.ru
Thu Oct 1 01:53:23 EDT 2020


Hello. I have an abstract database class inherited by a bunch of concrete database classes. The shared abstract class contains a data member which, according to the plan, must have a unique index. If we provide a definition of the index inside the abstract class ODB generates unique indices sharing the same name  (say, AbstractClassName_columnName_i) which is not good. We tried putting the index specification into the concrete classes (by referring to the base class member  in the pragma) and this approach actually worked until recently.  Latest modifications in our code base introduced new dependencies between database classes which made the dreaded same name index definition appear again (alongside the good definition). By removing some of the dependencies I was able to make it go away, but that comes at cost of some useful functionality that ODB provides (like object relationships). Is there a recommended approach to handling an issue like this or does it look like a bug?


More information about the odb-users mailing list