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

Incorrect checking if primary key columns are all NULL in equals() #1029

Open
dymoksc opened this issue Jul 13, 2016 · 1 comment
Open

Incorrect checking if primary key columns are all NULL in equals() #1029

dymoksc opened this issue Jul 13, 2016 · 1 comment

Comments

@dymoksc
Copy link

dymoksc commented Jul 13, 2016

When model is set to use multiple columns as its primary key it still has if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) condition in generated equals() method instead of using isPrimaryKeyNull method for this test. This leads to confirming, that two models are equal despite the fact they are not.

@marcj
Copy link
Member

marcj commented Sep 1, 2016

Care to send us a pull-request?

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