On Dec 1, 2010, at 5:35 PM, Andrew R. Kinnie wrote: > Hmm. That was checked, but set as false. In any event, I was using an > auto-increment. I gather I should remove this? EOF will do the right thing > and create it's own pk?
Yes. Auto-increment does not mix well with data created from EOF. > I changed the debug enabled to true and got this in the console when I tried > to delete a duplicate: > ... > SELECT t0.AGENT_ID, t0._rowid, t0.COMIC_ID FROM BOOKING t0 FOR UPDATE > ... > That is a pretty clear sign that EOF is visibly upset. :-) See if removing the auto-increment helps. Chuck > On Dec 1, 2010, at 8:29 PM, Chuck Hill wrote: > >> >> On Dec 1, 2010, at 5:25 PM, Andrew R. Kinnie wrote: >> >>> The database is MySQL. I previously was using Openbase, but now it's MySQL. >>> >>> There is no BLOB/CLOB or anything exciting like that. There is a long >>> performanceid and dateTime for the eventDate as well as the pk of the >>> booking itself. >>> >>> Hmm. I attempted to resolve my multiple booking with same data issue by >>> deleting the duplicate rows (making sure the auto-increment >> >> Auto increment? You are not using auto-increment columns with EOF are you? >> EOF won't like that. >> >> >>> was set to one higher than the highest pk, and not deleting that one) and >>> at first it seemed to work. I attempted to change the sort ordering, and >>> now all the bookings for one performance disappeared (they are still in the >>> db) >> >> It sounds like you are doing something bad with primary keys. Are you using >> inheritance? >> >> Turn on SQL logging. You are working in the dark without that. >> >> <PastedGraphic-1.pdf> >> >> Chuck >> >>> >>> On Dec 1, 2010, at 8:18 PM, Chuck Hill wrote: >>> >>>> Which database? Have you turned on SQL logging to see what SQL is being >>>> generated. Generally, EOF should _not_ be locking rows. Is there a >>>> BLOB/CLOB in the table being deleted? >>>> >>>> This can also be a symptom of violating the EOF commandments which results >>>> in EOF getting confused between inserts, updates, and deletes. Trying to >>>> process a delete as an update can result in data inconsistencies leading >>>> EOF to attempt row locking. >>>> >>>> >>>> Chuck >>>> >>>> >>>> On Dec 1, 2010, at 4:50 PM, Andrew R. Kinnie wrote: >>>> >>>>> I have an app with a D2W component which is having issues deleting. >>>>> Specifically, I have two entities relevant Booking and Performance which >>>>> are related. Booking has a to-one to Performance. (Performance has a >>>>> to-many to Booking) A Booking is essentially a Performance on a >>>>> particular event date. So If I have Jerry Seinfeld this weekend, I'd >>>>> have a Booking for Dec 3, and another for Dec 4. When we attempted to >>>>> add some bookings for the weekend, the user added three bookings for >>>>> Jerry on Dec 3, and when we tried to delete them, we got this: >>>>> >>>>> com.webobjects.eoaccess.EOGeneralAdaptorException: >>>>> lockRowComparingAttributes -- com.webobjects.jdbcadaptor.JDBCChannel: >>>>> lock operation locked more than one row >>>>> The model for the Booking entity has a bookingid, a performanceid and an >>>>> eventDate. They were all used for locking. I deleted the performanceid >>>>> from the attributes for locking entry in the plist, and eliminated the >>>>> old entry in jdbc2info (for a no longer active db connection) but I still >>>>> get this error. I also removed the locking on eventDate, to no avail. >>>>> >>>>> In the short term, I'd be happy enough to simply delete them out of the >>>>> database, but I've always thought doing that through WO was greatly >>>>> preferred and would potentially avoid major issues, and in any event, D2W >>>>> presumably should not be doing this. >>>>> >>>>> Any ideas? >>>>> >>>>> Recently updated wonder (5.4 branch) running on a mac, 10.6. >>>>> >>>>> Andrew -- Chuck Hill Senior Consultant / VP Development 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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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 arch...@mail-archive.com