Re: rawRowsForSQL Problem
Re: rawRowsForSQL Problem
- Subject: Re: rawRowsForSQL Problem
- From: email@hidden
- Date: Tue, 30 Nov 2004 11:17:31 -0800
Well, I found that if I use EOAdaptorChannel.evaluateExpression() instead of
EOUtilities.rawRowsForSQL(), I don't get an exception. Also, the issue only
occurs if I execute an UPDATE statement with rawRowsForSQL().
Not sure why...
Quoting email@hidden:
> Hi,
>
> I'm having an issue with rawRowsForSQL causing an error in a seemingly
> unrelated
> section of code. If I invoke EOUtilities.rawRowsForSQL() before a subsequent
> call to saveChanges(), I get the following exception:
>
> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception
> occurred while handling request:
> java.lang.IllegalArgumentException: Array is empty
> [2004-11-30 12:32:25 CST] <WorkerThread7> java.lang.IllegalArgumentException:
> Array is empty
> at com.webobjects.foundation.NSArray.objectAtIndex(NSArray.java:488)
> at com.webobjects.jdbcadaptor.JDBCPlugIn.newPrimaryKeys(JDBCPlugIn.java 625)
> at
>
com.webobjects.jdbcadaptor.JDBCChannel.primaryKeysForNewRowsWithEntity(JDBCChannel.java:537)
> at
>
com.webobjects.eoaccess.EODatabaseContext._batchNewPrimaryKeysWithEntity(EODatabaseContext.java:5891)
> at
>
com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5874)
> at
>
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:409)
> at
>
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3165)
>
> --
>
> I am executing a SQL UPDATE via rawRowsForSQL on an order header before
> adding
> line items to the order--saving the line items is what throws the exception.
> I
> thought rawRowsForSQL bypassed EOF, but apparently it is mucking something
> up..??
>
> Thanks,
> Ian
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> 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
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
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