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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists% 40anderhome.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]

--
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to