Re: ec.saveChanges() and date to update
Re: ec.saveChanges() and date to update
- Subject: Re: ec.saveChanges() and date to update
- From: Pascal Robert <email@hidden>
- Date: Thu, 18 Apr 2013 05:15:19 -0400
Don't put locks in the model for date time attributes, most of the them, you will get errors like the one you have.
> Hi List,
>
> I have a little problem when I use ec.saveChanges() to update date. When the date in database is null there is no problem :
>
> Begin Internal Transaction
> evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "UPDATE RFCCT.COMPETENCE SET DATE_MODIF = ? WHERE (COMP_ID = ? AND COMM = ? AND DATE_CREA = ? AND DATE_FIN is NULL AND DATE_MODIF is NULL AND DOM_ID = ? AND MAT_ID = ? AND PERS_ID_CREA = ? AND PERS_ID_MODIF = ? AND TERR_ID = ?)" withBindings: 1:2013-04-18 11:07:35(dateModif), 2:3(compId), 3:"3ième test compétence"(comm), 4:2013-04-10 01:00:00(dateCrea), 5:1(domId), 6:3(matId), 7:25292(persIdCrea), 8:25292(persIdModif), 9:3(terrId)>
> === Commit Internal Transaction
>
> But when the date exist unable to update it with ec.saveChanges() method :
>
> === Begin Internal Transaction
> evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "UPDATE RFCCT.COMPETENCE SET DATE_MODIF = ? WHERE (COMP_ID = ? AND COMM = ? AND DATE_CREA = ? AND DATE_FIN is NULL AND DATE_MODIF = ? AND DOM_ID = ? AND MAT_ID = ? AND PERS_ID_CREA = ? AND PERS_ID_MODIF = ? AND TERR_ID = ?)" withBindings: 1:2013-04-18 11:08:43(dateModif), 2:3(compId), 3:"3ième test compétence"(comm), 4:2013-04-10 01:00:00(dateCrea), 5:2013-04-18 01:00:00(dateModif), 6:1(domId), 7:3(matId), 8:25292(persIdCrea), 9:25292(persIdModif), 10:3(terrId)>
> INFO er.transaction.adaptor.Exceptions - Database Exception occured: com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- er.extensions.jdbc.ERXJDBCAdaptor$Channel method failed to update row in database
> === Rollback Internal Transaction
>
> What I'm doing wrong?
>
> Thanks for the help
> Envoyé depuis iCloud
> _______________________________________________
> 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
_______________________________________________
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