There is currently no way to set a NULL via populate(). While the ignoreEmpty argument will prevent empty strings from being set on properties, it also prevents non-empty property values from being nulled (or even set to empty string).
It would be awesome to have more support in populate() to set nulls, perhaps that incorporates one or all of the following:
1.) All or nothing argument for setting nulls when empty
2.) List of properties to null/not null when empty
3.) Checks for nullable properties?
A couple of people have blogged about their solutions:
http://dustinmartin.net/cf9-orm-nulls-empty-strings-numeric-values/
http://www.danvega.org/blog/2011/6/16/ColdBox-Bean-Populator-and-ORM
I have this ready to go with tests. I want to test on Railo tomorrow, and then I'll commit.
Awesome.
—
Sent from Mailbox for iPhone