• 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: Null Object on Commit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Null Object on Commit


  • Subject: Re: Null Object on Commit
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 1 Jun 2006 21:33:35 -0700

It may be trying to propagate a null primary key. That is, it has not generated a PK for an object that is marked to propagate its PK to one of its related objects. These sorts of bugs are a real bother to track down.

Chuck


On Jun 1, 2006, at 9:27 PM, Owen McKerrow wrote:

Hi Ken,

I double checked and none of there are no to-one's that will be created when an instance of this object is made. And if memory serves me correct;y I believe I would get an error about not allowing null relationships. The error below is talking about a Null value in a Dictionary. What dictionary its referring to Im not sure.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

People who prefer typing to pointing then seem to prefer acronyms to save typing :-)
-Denis Stanton, On people using Command Line Interfaces



On 02/06/2006, at 1:17 PM, Ken Anderson wrote:

Owen,

When you have a to-one relationship that's mandatory, EOF will automatically create the related object for you. If you then create your own and call the to-one relationship set method, the one EOF created for you will just be floating around in the editing context. So, the one you created will save fine, and the one created by EOF will not be initialized. That's usually the problem with your set of circumstances.

Ken

On Jun 1, 2006, at 9:27 PM, Owen McKerrow wrote:

Hi All,

We're working with a 3rd Party DB that we can't modify the schema of and are receiving a strange error when trying to add a new row to a particular table.

Below is the SQL that WO is generating and below that the error that is produced. Its an Orcale 9i DB. However when we look at the DB the row has actually been added !

Any ideas on what's causing the error ? And why the row is still being made in the DB despite the fact that the Commit is meant to have failed.

"INSERT INTO TRACKINGOBJECTRESULTS
(RESTARTTOPIC,
HIGHQUIZDATE,
ATTEMPTS,
TRACKINGOBJECTSTATUS,
RESTARTID,
TRACKINGOBJECTID,
RECIPIENTID,
TRACKINGOBJECTSTARTDATE,
TRACKINGOBJECTSTATDATE,
SUBTOPICTRACKING,
TRACKINGOBJECTLASTDATE,
HIGHQUIZSCORE)

VALUES

(NULL, NULL, NULL, ?, NULL, ?, ?, ?, ?, NULL, ?, NULL)"

withBindings:
1:"1"(trackingObjectStatus),
2:"3"(trackingObjectId),
3:219(recipientId),
4:2006-06-02 10:08:46(trackingObjectStartDate),
5:2006-06-02 10:08:46(trackingObjectStatDate),
6:2006-06-02 10:08:47(trackingObjectLastDate)>



10:09:40,653 DEBUG [WorkerThread0] (Log.NSLogDebug:1546 appendln) - === Commit Internal Transaction
10:09:40,662 DEBUG [WorkerThread0] (Log.NSLogDebug:1546 appendln) - Commit failed on data source of type class com.webobjects.eoaccess.EODatabaseContext
10:09:40,678 DEBUG [WorkerThread0] (Log.NSLogDebug:1546 appendln) - java.lang.IllegalArgumentException: Attempt to insert null object into an com.webobjects.foundation.NSMutableDictionary.
at com.webobjects.foundation.NSMutableDictionary.setObjectForKey (NSMutableDictionary.java:199)
at com.webobjects.eoaccess.EODatabaseContext.commitChanges (EODatabaseContext.java:6515)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditi ngContext(EOObjectStoreCoordinator.java:425)
at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3226)
at Main.save(Main.java:279)
at Main.checkRecipient(Main.java:264)
at Main.checkLogin(Main.java:115)






Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"I like the way this project has somehow, against all common sense, got itself made."
- Peter Jackson, "The Lord of The Rings"



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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
References: 
 >Null Object on Commit (From: Owen McKerrow <email@hidden>)
 >Re: Null Object on Commit (From: Ken Anderson <email@hidden>)
 >Re: Null Object on Commit (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Re: Null Object on Commit
  • Next by Date: Re: Updated objects not present in updatedObjects() array ?
  • Previous by thread: Re: Null Object on Commit
  • Next by thread: Problem with webobject attributes in WOBuilder
  • Index(es):
    • Date
    • Thread