From: Michael H. <mh...@de...> - 2007-02-28 23:46:29
|
Well, it was working before I extended the ERXApplication, ERXSession and ERXDirectAction classes. So I am not suspecting that the valueTypes are wrong. But I will check those, just to make sure. Michael. Chuck Hill wrote: > > On Feb 28, 2007, at 3:04 PM, Michael Hast wrote: > >> Hi: >> >> I just converted my project to extend the WOnder ERXApplication, >> ERXSession and ERXDirectAction. The other code stayed the same so far. >> When I delete a record I now get the exception: >> 55811 [WorkerThread0] INFO er.transaction.adaptor.Exceptions - JDBC >> Exception occured: com.webobjects.eoaccess.EOGeneralAdaptorException: >> lockRowComparingAttributes -- com.webobjects.jdbcadaptor.JDBCChannel: >> lock operation locked more than one row >> >> Before using WOnder my SQL looked like this (with EOAdaptorDebugEnabled >> true) >> [2007-02-28 15:52:29 MST] <WorkerThread1> evaluateExpression: >> <com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "DELETE >> FROM EMPLOYEE WHERE (EMPLOYEE_ID = ? AND ACCESS_ENABLED = ? AND >> BAD_ATTEMPTS = ? AND EMAIL is NULL AND LAST_LOGIN_DATE is NULL AND >> LOGON_NAME = ? AND NAME = ? AND NUMBER_OF_LOGINS = ? AND PASSWORD = ?)" >> withBindings: 1:3(employeeId), 2:true(accessEnabled), 3:0(badAttempts), >> 4:"tesst"(logonName), 5:"tesst"(name), 6:0(numberOfLogins), >> 7:"tesst"(password)> >> [2007-02-28 15:52:29 MST] <WorkerThread1> 1 row(s) deleted >> >> Now I get different SQL: >> 55787 [WorkerThread0] DEBUG NSLog - evaluateExpression: >> <com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "SELECT >> t0.ACCESS_ENABLED, t0.BAD_ATTEMPTS, t0.EMAIL, t0.EMPLOYEE_ID, >> t0.LAST_LOGIN_DATE, t0.LOGON_NAME, t0.NAME, t0.NUMBER_OF_LOGINS, >> t0.PASSWORD FROM EMPLOYEE t0 WITH (UPDLOCK, ROWLOCK)"> >> 55805 [WorkerThread0] DEBUG NSLog - fetch canceled >> 55805 [WorkerThread0] DEBUG NSLog - 2 row(s) processed >> >> What does it do in WOnder to cause the WITH (UPDLOCK, ROWLOCK) ending >> SQL? Can I turn that off? > > Something is messed up in the model. I have seen things like that > happen when the jdbc2info stored in the EOModel was wrong. I have > also see incorrect valueTypes cause that. Check the connection > dictionary and the prototypes being used. > > Chuck > > -- > 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 > > > > -- Tel: (520) 572-9410 Desert Sky Software: www.desertsky.com Specializing in the Development and Hosting of e-Business Applications. |