How can I handle null values with ORM?
For example I need a datefield column that has null default value.
In my form I try to insert some values and a no value for the datefield input.
Got this error:
Error populating bean SeoDashboard.model.Sito with argument SCADENZA of type class java.lang.String.
Simple values are booleans, numbers, strings, and date-time values.
The value cannot be converted to a date because it is not a simple value.
If I have a date, how can I convert in null value?
Hey Luis, this is something I’m wanting to do as well. While ignoreEmpty works nicely to prevent empty strings from getting populated, it also has the somewhat unpleasant side-effect of not being able to change an extant value (e.g. “Fish”) to NULL or even empty string via populate().
I think being able to specify config for populating properties with NULL would be pretty nice.
Yes, I believe so. What are your ideas on this?
I know GORM has some pretty nice population additions and I have slacked off and not done it. So let’s just do it
Luis F. Majano
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano
I’ll post some thoughts tonight. I’ve implemented both ad-hoc in a few of my apps, and it seems to work pretty well.