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._exceptionWithDatabaseContextI
nformationAdded(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 (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]