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

Weird EOExceptions


  • Subject: Weird EOExceptions
  • From: Ute Hoffmann <email@hidden>
  • Date: Wed, 19 Sep 2007 09:48:50 +0200

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._exceptionWithDatabaseContextInformationAdded(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 :-(

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Weird EOExceptions
      • From: Chuck Hill <email@hidden>
    • Re: Weird EOExceptions
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: Invoking a component with arguments in WOD
  • Next by Date: Feedback on tomcat deployment
  • Previous by thread: Re: Invoking a component with arguments in WOD
  • Next by thread: Re: Weird EOExceptions
  • Index(es):
    • Date
    • Thread