Closed antonmarin closed 4 years ago
FactoryGenerator uses getPk(), pk() methods or id, _id fields. But my record can have not all of, and i will get error while inserting record (smth like field cannot be null).
So may be implement some interface or add support for yii2, it uses method getPrimaryKey(), which return array of fields of pk? https://www.yiiframework.com/doc/api/2.0/yii-db-baseactiverecord#getPrimaryKey()-detail
Thanks for getting in touch, and sorry for the long delay. I think https://github.com/thephpleague/factory-muffin/pull/469 will do what you need?
Hi! Great looks like it would help. Thanks for feedback.
FactoryGenerator uses getPk(), pk() methods or id, _id fields. But my record can have not all of, and i will get error while inserting record (smth like field cannot be null).
So may be implement some interface or add support for yii2, it uses method getPrimaryKey(), which return array of fields of pk? https://www.yiiframework.com/doc/api/2.0/yii-db-baseactiverecord#getPrimaryKey()-detail