Use composition instead of inheritance

and remove `dbObjectId`