vlucas / Spot

[DEPRECATED - use v2] Simple DataMapper ORM for PHP 5.3+
75 stars 14 forks source link

Integer fix #27

Closed pnomolos closed 11 years ago

pnomolos commented 11 years ago

This also includes a fix for isModified - fields set to NULL return false for isset so I used array_key_exists instead.

pnomolos commented 11 years ago

A follow-up to this. Should setting an Integer field to '' be cast to 0 or set to NULL? I'm running into this issue when passing $_POST data...

vlucas commented 11 years ago

To me, an empty string is the same as NULL - It's no value.

pnomolos commented 11 years ago

Would you feel comfortable then having it cast an empty string to a NULL?

vlucas commented 11 years ago

Yes, that's fine with me

vlucas commented 11 years ago

Merged with a cherry-pick due to issues with merge and rebase. SHA1: eb53bae6998c9e7bc9941b1ed4aa8febdc48c19c