Store model type in database.