• 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: deleteSelection sets relationship null rather than deleting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deleteSelection sets relationship null rather than deleting


  • Subject: Re: deleteSelection sets relationship null rather than deleting
  • From: Arturo Perez <email@hidden>
  • Date: Wed, 05 Oct 2005 09:31:23 -0400

Ian Joyner wrote:
On 05/10/2005, at 10:42 AM, LD wrote:

Now I get:

[2005-10-05 15:45:25 EST] <WorkerThread6> com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression: "UPDATE TELEPHONE SET OWNER_KEY = NULL WHERE (PRIMARY_KEY = ? AND LOCATION_KEY is NULL AND NUMBER = ? AND KIND_KEY = ? AND TYPE_KEY = ? AND AREA_CODE = ? AND COUNTRY_CODE = ? AND OWNER_KEY = ? AND OWNER_TYPE = ?)" withBindings: 1:528(primary_key), 2:"447567"(number), 3:16(kind_key), 4:18(type_key), 5:"345"(area_code), 6:"61"(country_code), 7:308(owner_key), 8:"P"(owner_type)>:
Next exception:SQL State:42000 -- error code: 0 -- msg: ERROR - Value can not be NULL for column 'OWNER_KEY'
SQL: UPDATE TELEPHONE SET OWNER_KEY = NULL WHERE (PRIMARY_KEY = 528 AND LOCATION_KEY is NULL AND NUMBER = '447567' AND KIND_KEY = 16 AND TYPE_KEY = 18 AND AREA_CODE = '345' AND COUNTRY_CODE = '61' AND OWNER_KEY = 308 AND OWNER_TYPE = 'P')


instead of

DELETE TELEPHONE WHERE ........

Any ideas appreciated

Ian



Maybe you're setting the relationships to null rather than deleting them?

You should be using removeObjectFromBothSides<blah> and deleteObject.

-arturo

_______________________________________________
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:
    • Xcode Tools 2.2 Developer Preview 1
      • From: Helge Staedtler <email@hidden>
References: 
 >deleteSelection sets relationship null rather than deleting (From: Ian Joyner <email@hidden>)
 >Re: deleteSelection sets relationship null rather than deleting (From: LD <email@hidden>)
 >Re: deleteSelection sets relationship null rather than deleting (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Axis exception vending complex types service
  • Next by Date: Re: Re: New web service project from scratch problems
  • Previous by thread: Re: deleteSelection sets relationship null rather than deleting
  • Next by thread: Xcode Tools 2.2 Developer Preview 1
  • Index(es):
    • Date
    • Thread