From: Richard B. <rb...@us...> - 2004-12-19 22:43:28
|
Update of /cvsroot/jcframework/dotnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7711 Modified Files: CClassMap.vb readme.html Log Message: Fix for udpate statements where parameters contain NULL and where ANSI null handling is on. Index: readme.html =================================================================== RCS file: /cvsroot/jcframework/dotnet/readme.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- readme.html 15 Dec 2004 23:46:12 -0000 1.4 +++ readme.html 19 Dec 2004 22:43:17 -0000 1.5 @@ -164,6 +164,11 @@ <td class="col1">Incorrect SQL Generation</td> <td>SQL generated for associations to classes with children using shared tables was broken. For now the child objects are not retrieved.<td> </tr> + <tr valign="top"> + <td>1064420</td> + <td class="col1">Missing parameters</td> + <td>Update statements were being generated with missing parameters. This only occurred when parameters for the where clause had NULL values and when ANSI null handling was on.<td> + </tr> <tr class="tableCaption" valign="bottom"> <td colspan=3><br/>Modifications</td> </tr> Index: CClassMap.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CClassMap.vb,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- CClassMap.vb 17 Dec 2004 03:29:01 -0000 1.47 +++ CClassMap.vb 19 Dec 2004 22:43:17 -0000 1.48 @@ -1281,10 +1281,14 @@ Next m_sqlUpdateStub = m_updateStatement.SqlString End If - m_updateWhereParamPosition = Me.getSize + m_updateWhereParamPosition = Me.getSize + 1 For Each AttrMap In Me.AttributeMaps - If AttrMap.ColumnMap.IsIdentity OrElse (Not Me.SharedTableValue Is Nothing AndAlso Not AttrMap.AttributeMap Is Nothing) Then + If AttrMap.ColumnMap Is Nothing Then m_updateWhereParamPosition -= 1 + Else + If AttrMap.ColumnMap.IsIdentity OrElse (Not Me.SharedTableValue Is Nothing AndAlso Not AttrMap.AttributeMap Is Nothing) Then + m_updateWhereParamPosition -= 1 + End If End If Next |