When I am creating a new report, my fields client, date, and location are marked (little red asterisk) as being required.
If I leave the location blank or if I don’t choose the client, I get a very nice warning that these fields are mandatory.
- A Contact Report must have a Client.
- Please provide a Location.
However, if I leave the date field blank (obvious op error) the app crashes.
EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "INSERT INTO contactreport(brieflogoid, iscomplete, distribution, clientid, jobname, meetingdate, contactreportnotes, personid, nextsteps, location, jobnumber, id, meetingdecisions, meetingpoints, meetingattendees, lastedited) VALUES (?::int4, ?::bool, NULL, ?::int4, NULL, NULL, NULL, ?::int4, NULL, ?::text, NULL, ?::int4, NULL, NULL, NULL, ?::text)" withBindings: 1:1(briefLogoID), 2:false(isComplete), 3:2(clientID), 4:1(personID), 5:"xfgfdgn"(location), 6:7(id), 7:"S. Admin"(lastEdited)>: Next exception:SQL State:23502 -- error code: 0 -- msg: ERROR: null value in column "meetingdate" violates not-null constraint Detail: Failing row contains (1, 2, null, null, 7, f, null, null, xfgfdgn, null, null, null, null, null, 1, S. Admin).
I checked the model and meetingDate is a Timestamp and does not allow nulls. I guess I could set up the init method to insert today’s date as a default and not worry about it but why is D2W blowing up here.
Is there something special about dates and not null?