fix one-to-many and pk error