I have written my pojos to be similar to the pojos in the examples directory of the downloads where the member variables don't have a value. Hence, they are initialized to null. I am running into a situation where the database specifies a column is not null and there is a default value. If I don't set a value for the member using a setter, then the database gives an error. If I set the value to an empty string, then the database will place the default value in the column.
So my work around is to set default values for the strings in the pojo, but I'm not sure if this is the "correct" way of doing things since I don't see it being done in the examples that come with the download.
Do I need to set something in the configuration file or the properties file to use the database default value?
thanks,
Mike
|