• 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: "Albert Jagnow" <email@hidden>
  • Date: Mon, 6 Oct 2003 16:48:08 -0500
  • Priority: normal
  • Thread-topic: Database won't accept null foreign key

That is correct the column is defined as NOT NULL.  My problem is that I
can't make any changes to the database.  I am not the administrator of
the DB, and the people who do administer it say that the column can not
be set to allow null values because it will break some really old AS/400
RPG programs that do not know how to deal with null data, or something
bizarre like that.  As much as I would like to change the DB to work as
it should I am unable to do so.  This means that I need to get WO to
work with the DB as is however much of a pain as that will be.  It may
be just a matter of working with the relationships totally manually
instead of having WO try and set/fetch them automatically.  In other
words I won't define a relationship in WO and just fetch the other data
in code if a relationship exists.  I was hoping maybe someone had been
in this situation before and had a more elegant solution.

--Albert

-----Original Message-----
From: Chuck Hill [mailto:email@hidden]
Sent: Monday, October 06, 2003 4:25 PM
To: Albert Jagnow
Cc: email@hidden
Subject: Re: Database won't accept null foreign key


It sounds like the FK column is defined as NOT NULL.  Can you just
drop that constraint, or recreate the table without it?

Chuck


Albert Jagnow 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?
>
> --Albert
>
>
> This e-mail (including any attachments) is covered by the Electronic
> Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
> may be legally privileged. If you are not the intended recipient, you
> are hereby notified that any retention, dissemination, distribution,
or
> copying of this communication is strictly prohibited. Please reply to
> the sender that you have received the message in error, and then
delete
> it. Thank you.
> _______________________________________________
> 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.

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton


This e-mail (including any attachments) is covered by the Electronic
Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
may be legally privileged. If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited. Please reply to
the sender that you have received the message in error, and then delete
it. Thank you.
_______________________________________________
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: Database won't accept null foreign key
  • 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