• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
D2W app date field is required ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D2W app date field is required ???


  • Subject: D2W app date field is required ???
  • From: Theodore Petrosky <email@hidden>
  • Date: Tue, 22 Jul 2014 15:41:12 -0400

I have a simple D2W app that creates pdfs from various data. I have a report that requires minimally choosing a client, a location and a date for the event. 

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?

Ted
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: D2W app date field is required ???
      • From: Philippe Rabier <email@hidden>
  • Prev by Date: Re: maven.wocommunity.org is down
  • Next by Date: Sharing an EO model between applications... ?
  • Previous by thread: Re: app closing method
  • Next by thread: Re: D2W app date field is required ???
  • Index(es):
    • Date
    • Thread