modified db.model instances to specify parent