Created the class to handle Models differences.

Method DatabaseModel::getCodeDefinition() was simplified.

Created DatabaseModel::getCreationOrder() that returns a map that
contains the correct object creation order.
Removed unused methods from BaseObject class.