• 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: Weird EOExceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird EOExceptions


  • Subject: Re: Weird EOExceptions
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 19 Sep 2007 07:51:17 -0700


On Sep 19, 2007, at 12:48 AM, Ute Hoffmann wrote:

Hallo,
I have a app, where I need to delete some data before reading more data in via an import mechanism.


But my seemingly simple deletes throws weird errors - perhaps someone knows what is going on here.

Delete jointable from many to many (Objects where the joins point to are to stay intact):

Exception:
com.webobjects.eoaccess.EOGeneralAdaptorException: deleteRowDescribedByQualifierEntity -- com.webobjects.jdbcadaptor.JDBCChannel: method deleted 4 rows, it is only permitted to update 1 row
at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContex tInformationAdded(EODatabaseContext.java:4686)


Code:

NSArray produktverknuepfungen1 = EOUtilities.objectsForEntityNamed (ec, "Jgruppeprodukt");

if(produktverknuepfungen1.count()!=0){
	for(int m=0; m<produktverknuepfungen1.count(); m++){
	Jgruppeprodukt aPZWert = new Jgruppeprodukt();
	aPZWert = (Jgruppeprodukt)produktverknuepfungen1.objectAtIndex(m);
	ec.deleteObject(aPZWert);
	ec.saveChanges();
	}
}

Any idea what goes wrong here???

Second case (even more inexplainable to me):

A one- to many. I try to delete the to-many part, I do exactly the same with same code before I do this and it works. With this relationship however I get an Exception that the "pzusatzgruppes" in produkt (Produkt <->>Pzusatzgruppe) is not an array. I checked and checked and IT SEEMS TO BE AN Array. Nothing I can see differentiates the relationship and the java-classes belonging to it from the relationship which works :-(

What is the exact error message? It could be that it is an NSArray and EOF wants it to be an NSMutableArray. Again, as Ken said, it is a modeling error or something in your code doing this.


Chuck



Im at a loss. Some ideas?

Can it be that mysql 5 has problems with my JDBC-Driver? Which one should be used with mysql 5? I need one which is able to handle international characters ISO-Latin something. This could explain Exception 1 but not Exception 2??

Thank you for your help,

Regards

Ute

PS. Running WO 5.2.4 on Mac OS X 10.4.10 with Xcode 2.0 -> could that combination make for the problems?


_______________________________________________
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

--

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: 
 >Weird EOExceptions (From: Ute Hoffmann <email@hidden>)

  • Prev by Date: Re: Validating a percentage?
  • Next by Date: Re: Feedback on tomcat deployment
  • Previous by thread: Re: Weird EOExceptions
  • Next by thread: Re: Weird EOExceptions
  • Index(es):
    • Date
    • Thread