• 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
columns being set to null for no apparent reason
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

columns being set to null for no apparent reason


  • Subject: columns being set to null for no apparent reason
  • From: Larry Mills-Gahl <email@hidden>
  • Date: Wed, 26 May 2010 13:57:47 -0400

Hello,

I setup what I think is a pretty simple program to map some external identifier strings to existing data. Two display groups on one page. First display group is the objects (Center) to be edited, the second display group (ExternalCenter) is used to find the right match by searching on the name.

One attribute of the Center is all that is being updated. 

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: : Next exception:SQL State:23000 -- error code: 1048 -- msg: Column 'parentCenterFK' cannot be null 
Reason: EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE center SET cmsnum = ?, parentCenterFK = NULL, active = NULL WHERE (centerKey = ? AND active = ? AND cmsnum is NULL AND code = ? AND name = ? AND parentCenterFK = ?)" withBindings: 1:"310001"(cmsProviderNumber), 2:620(centerkey), 3:1(active), 4:"HUMED"(code), 5:"University Medical Center"(name), 6:620(parentcenterfk)>: Next exception:SQL State:23000 -- error code: 1048 -- msg: Column 'parentCenterFK' cannot be null            

I do not understand why the parentCenterFK is being set to NULL in the SQL (especially since it looks like it would be set in the bindings). Also, "active" should not be null either. 
The model and the schema both define these fields as not allowing null. 

Could this be that in some instances a record is it's own parent (parentCenterFK = centerKey)? That is the only special case that I see here that may be causing the problem (is EO protecting itself against some recursive nightmare?)

Larry Mills-Gahl
 _______________________________________________
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: columns being set to null for no apparent reason
      • From: Chuck Hill <email@hidden>
    • Re: columns being set to null for no apparent reason
      • From: Mark Wardle <email@hidden>
  • Prev by Date: Re: WWDC? (Was: Snow Leopard, Apache 2.2, Skewed Load Balancing?)
  • Next by Date: Re: columns being set to null for no apparent reason
  • Previous by thread: Re: WWDC? (Was: Snow Leopard, Apache 2.2, Skewed Load Balancing?)
  • Next by thread: Re: columns being set to null for no apparent reason
  • Index(es):
    • Date
    • Thread