Skip to content

Conversation

@Unlink
Copy link
Contributor

@Unlink Unlink commented Jul 24, 2015

If is there in row with primary key value "0", it could broke results
See http://forum.nette.org/cs/23838-nette-database-problem-s-nactenim-zaznamu (CZ).

I'm not sure how to write tests in nette database, but i tried write falling test and i wrote fix for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe (string) $primary === '' ? $key : $primary to aviod function calling.

dg added a commit that referenced this pull request Sep 14, 2015
Selection: fixed bug with zero in primary key
@dg dg merged commit 67126dc into nette:master Sep 14, 2015
@Unlink Unlink deleted the zero-pk-fix branch September 27, 2015 14:14
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

Successfully merging this pull request may close these issues.

2 participants