Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No explicit support by FactoryGenerator #460

Closed
antonmarin opened this issue Dec 12, 2018 · 2 comments
Closed

No explicit support by FactoryGenerator #460

antonmarin opened this issue Dec 12, 2018 · 2 comments

Comments

@antonmarin
Copy link

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

@GrahamCampbell
Copy link
Member

Thanks for getting in touch, and sorry for the long delay. I think #469 will do what you need?

@antonmarin
Copy link
Author

Hi! Great looks like it would help. Thanks for feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants