AW: [odb-users] reuse inheritance with templated base class
Marcel Nehring
mne at qosmotec.com
Fri Aug 29 05:32:07 EDT 2014
Hi Boris,
thanks for elaborating on the matter.
Thanks for the bug fix, too. I changed traits.hxx as you suggested and it works now.
Unfortunately I ran into another problem. Do I have to take special care when using a member which is mapped to a column of type BLOB when using it with a polymorphic base class? The example code I added below is giving me a compile error stating that "struct 'odb::access::object_traits_impl<Derived,id_oracle>::image_type'" has no applicable copy-constructor. Without the polymorphic base it compiles.
Thanks,
Marcel
######
#include <vector>
#pragma db object polymorphic
class Base
{
public:
#pragma db id auto
int id;
virtual void foo() const = 0;
};
#pragma db object
class Derived : public Base
{
public:
#pragma db type("BLOB")
std::vector<unsigned char> m_payload;
};
More information about the odb-users
mailing list