• 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: Error with deleting object in WebObjects and Microsoft SQLServer 2005
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with deleting object in WebObjects and Microsoft SQLServer 2005


  • Subject: Re: Error with deleting object in WebObjects and Microsoft SQLServer 2005
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 26 Oct 2009 10:41:03 -0700


On Oct 26, 2009, at 4:39 AM, Freddie Tilley wrote:

I have a Tree object linking to itself via a parent id and when I set
the child relationship to cascade.

But when I delete the parent object (with children), I get the following error:

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression
failed: : Next exception:SQL State:23000 -- error code: 547 -- msg:
The DELETE statement conflicted with the SAME TABLE REFERENCE
constraint "Tree_parent_FK". The conflict occurred in database
"TreeDatabase", table "dbo.Tree", column 'parentID'.

It looks like the cascade isn't working.

The cascade is working but the ordering is wrong. SQL Server can't handle deferred constraints. The easiest solution is to drop the FK constraint. The other solution is to order the delete operations and that is NOT easily done.


Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
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: Error with deleting object in WebObjects and Microsoft SQLServer 2005
      • From: Freddie Tilley <email@hidden>
References: 
 >Error with deleting object in WebObjects and Microsoft SQLServer 2005 (From: Freddie Tilley <email@hidden>)

  • Prev by Date: Re: WebServerResources url for changed application nane
  • Next by Date: Re: WebServerResources url for changed application nane
  • Previous by thread: Re: Error with deleting object in WebObjects and Microsoft SQLServer 2005
  • Next by thread: Re: Error with deleting object in WebObjects and Microsoft SQLServer 2005
  • Index(es):
    • Date
    • Thread