Jonathan Stanton Fri Apr 22 13:11:21 -0400 2011

Subject: validates_uniqueness_of NULL question

I want there to always be unique values on my field except for NULL values, it should be ok that I have many NULL values. Is that what validates_uniqueness_of does?

EG this should be ok:
------------
0
NULL
NULL
1
NULL
2
------------
but this should not be ok:
------------
0
NULL
NULL
1
NULL
2
2


Yoan B Sun Apr 24 12:17:20 -0400 2011

Can you open an issue on github (http://github.com/kla/php-activerecord/issues) with that + a little test case? Thank you.

Yoan B Wed May 04 17:09:03 -0400 2011
Yoan B Wed May 11 04:54:01 -0400 2011

Be my guest and propose more tests if you feel the need to: https://github.com/greut/php-activerecord/compare/gh121

(1-3/3)