[odb-users] Issue in derived class callback
Boris Kolpackov
boris at codesynthesis.com
Mon Mar 29 10:16:26 EDT 2021
Domenico Di Iorio <ddiorio at jmawireless.com> writes:
> Issue has been found when registering callback in derived class.
> Apparently it overrides the one registered in base class.
> Is it already known?
>
> e.g.
> #pragma db callback(cb1)
> class Base {
> ...
> }
>
> #pragma db callback(cb2)
> class Derived : public Base {
> ...
> }
>
> cb1 gets overridden by cb2.
Hm, which one of the two cases is this:
1. cb2 is now called for instances of the Base class.
2. cb2 is now called for instances of the Derived class.
If it's (1), then that would definitely be a bug. If it's (2), then
that seems like a fairly logical and flexible behavior.
More information about the odb-users
mailing list