the DBI.FieldConverter has a funny thing in the conversion lookup
from Smalltalk to Database Type. The look-up is based on classes
and this doesn't really work for Boolean and Integer.
st> FieldConverter uniqueInstance print: true on: stdout
will not go through the >>#writeBoolean:on: selector but the
generic one, the same applies to the Integer conversion. This
is because instances are of class True, False, SmallInteger,
For the Boolean it was easy to add True/False to the lookup
table for integers this is getting hairy.
Il 20/05/2013 08:55, Holger Hans Peter Freyther ha scritto:
> aValue isNil ifTrue: [ aStream nextPutAll: 'NULL'. ^self ].
> aSelector := converterSelectors at: aValue class
> ifAbsent: [ aValue isInteger
> ifTrue: [#writeInteger:on:]
> ifFalse: [#defaultConvert:on:]].
> but then again, I could just remove the writeInteger:on:
> selector and entry from the look-up table. How should I
You can leave the Integer entry in the table, but commented out.