• 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: Ken Anderson <email@hidden>
  • Date: Thu, 01 Jun 2006 23:17:27 -0400

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.saveChangesInEditing Context(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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Null Object on Commit
      • From: Owen McKerrow <email@hidden>
References: 
 >Null Object on Commit (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Null Object on Commit
  • Next by Date: Re: Null Object on Commit
  • Previous by thread: Null Object on Commit
  • Next by thread: Re: Null Object on Commit
  • Index(es):
    • Date
    • Thread