Project

General

Profile

Loosing control of the order of Dbo object's DB table creation(mapping).

Added by Plug Gulp 9 months ago

I observed that Wt::Dbo uses std::map to register all the Dbo objects. And the key is C++ typeid. This creates problem when a Dbo library user wants to specify the order of Dbo object creations. Also, the typeid of a class may change thus making the order of initialisation dependent on compiler name mangling. There is no way for the user of the Dbo library to understand in what order the Dbo objects are created.


Replies (1)

RE: Loosing control of the order of Dbo object's DB table creation(mapping). - Added by Roel Standaert 9 months ago

There may indeed be no predetermined order in which tables are created. I'm not sure what the use case would be for controlling it, though.

    (1-1/1)