[odb-users] Support more then one database vendor in a single application?

Boris Kolpackov boris at codesynthesis.com
Thu Aug 30 09:25:18 EDT 2012


Hi Oded,

Oded Arbel <oded at geek.co.il> writes:

> I still want to expose the model classes themselves, so that the
> application can say things like:
> vector<Employee> employees = Employee::getAll();
> for (vector<Employee>::iterator it = employees.begin(); it !=
> employees.end(); ++it)
>   it->employer->processSalary(*it);
> 
> Where Employee and Employer are the model classes used in ODB, and
> getAll() and processSalary() are business logic methods on these
> classes.
> 
> I don't want to have the application compile against ODB headers
> because that causes VC++ to freak out. It should work fine - unless I
> use ODB datatypes like odb::nullable, which I need to represent my
> model correctly, and at which point application code start seeing
> libodb headers and I get export warnings.

That is very strange since libodb itself is built as a DLL and
includes all the necessary export/import machinery.

Can you show the errors/warnings you are getting? Better yet,
can you create a test solution that reproduces this problem?

Boris



More information about the odb-users mailing list