henning 2004/10/20 14:54:30
Modified: src/generator/src/templates/om Tag: TORQUE_3_1_BRANCH
Peer.vm
xdocs Tag: TORQUE_3_1_BRANCH changes.xml
Log:
Skip binary columns when building a criteria for an object. Should fix TRQS230.
Revision Changes Path
No revision
No revision
1.5.2.11 +3 -0 db-torque/src/generator/src/templates/om/Peer.vm
Index: Peer.vm
===================================================================
RCS file: /home/cvs/db-torque/src/generator/src/templates/om/Peer.vm,v
retrieving revision 1.5.2.10
retrieving revision 1.5.2.11
diff -u -r1.5.2.10 -r1.5.2.11
--- Peer.vm 20 Oct 2004 01:26:18 -0000 1.5.2.10
+++ Peer.vm 20 Oct 2004 21:54:30 -0000 1.5.2.11
@@ -894,10 +894,13 @@
#foreach ($col in $table.Columns)
#set ( $cfc=$col.JavaName )
#set ( $cup=$col.Name.toUpperCase() )
+ #set ( $cjtype = $col.JavaNative )
#if ($col.isPrimaryKey() && !$table.IdMethod.equals("none"))
if (!obj.isNew())
#end
+ #if ( $cjtype != "byte[]" )
criteria.add($cup, obj.get${cfc}());
+ #end
#end
return criteria;
}
No revision
No revision
1.140.2.11 +8 -0 db-torque/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
retrieving revision 1.140.2.10
retrieving revision 1.140.2.11
diff -u -r1.140.2.10 -r1.140.2.11
--- changes.xml 20 Oct 2004 21:43:18 -0000 1.140.2.10
+++ changes.xml 20 Oct 2004 21:54:30 -0000 1.140.2.11
@@ -42,6 +42,14 @@
<action type="update" dev="henning" issue="TRQS231">
Do not output binary column when invoking toString() from the generated
objects.
</action>
+ <action type="update" dev="henning" issue="TRQS230">
+ When building a criteria to represent an object, skip binary columns. Their
content
+ will not help much anyway and if you really insist on building an object that
differs
+ from an existing object only by the contents of a binary column (which
implies that
+ such a column might be a primary key), then you deserve to suffer. Don't do
this.
+ For everyone else, this change might actually make
<code>doDelete(object)</code> work if your
+ object contains a binary column.
+ </action>
</release>
<release version="3.1.1-RC3" date="2004-10-16">
<action type="update" dev="henning">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]