• 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
Re: Database won't accept null foreign key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database won't accept null foreign key


  • Subject: Re: Database won't accept null foreign key
  • From: Ray Ackland <email@hidden>
  • Date: Tue, 7 Oct 2003 11:45:05 +1300

Albert,

Another possibility. Don't know if this will screw up other systems on the database though.

Check what settings you have in you EO model (advanced relationships inspector) regarding optionality and delete rule. I expect the delete rule says "Nullify". Perhaps setting that to "no action" may give you the result you want (but may also leave a hanging link, depending on the way the database is set up). Honestly though, I don't have a solid grasp of the nuances of those settings. I have the luxury of being able to experiment without destroying other people's databases.

If the database is requiring that key to be zeroed, then I would go with Chuck's suggestion.

Ray.

On Tuesday, Oct 7, 2003, at 10:55 Pacific/Auckland, email@hidden wrote:

I am working with a database that for whatever reason won't allow a
foreign key to be null if the relationship does not exist. I am unable
to make any changes to the database setup. In this database table A may
have an optional one-one relationship with table B. If there is not
relationship or I delete a relationship, WO wants to set the foreign key
in table A for table B to null. The database won't allow the foreign
key column of table A to be null it wants it to be 0. Is there an easy
trick to get WO to generate 0 instead of null for that key if the
relationship does not exist?
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Newbie question about java 1.4.1 and D2Java clients
  • Next by Date: Re: Database won't accept null foreign key
  • Previous by thread: Re: Database won't accept null foreign key
  • Next by thread: Re: Database won't accept null foreign key
  • Index(es):
    • Date
    • Thread