Ok, thanks. I will play with it a bit
next time I have time. Seen inline parameter maps just not the jdbc type
specified inline. Thanks again for your time. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] As of right now I do not believe this to be a bug. I believe that
for some reason the jdbcType is not what you think it is. When the lookup
is done for the jdbcType it is not found and therefor reverts to the default
handler for that class. In this case
the ByteArrayTypeHandler. The syntax that I gave you is called inline parameter maps and can be
found on page 21 of the developers guide. Nathan On Jan 19, 2006, at 2:06 PM, March, Andres wrote:
Never seen that syntax before. I
can give that a try but my interest is only in rooting out a possible
bug. I don’t use byte[] for this purpose anymore, so I don’t use the type
handler. I would have to build a test case, since my app doesn’t write in
this manner anymore. Might have to wait until I have some spare
cycles. If you could point me to where the typeHandler lookup is done, I
might be able to submit a patch, if you agree it is a bug. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Here is one last attempt :) Try using the CTH you defined to use
NUMERIC like you had at first. Then in the sqlmap try to define your
column to use NUMERIC i.e. #column_name:NUMERIC# Nathan On Jan 19, 2006, at 1:37 PM, March, Andres
wrote:
That’s right the default
one is being called. No, I haven’t left the jdbtype off because I don’t
want all byte[] to be saved this way. I guess I could try that. It seems since the default
one is being called that maybe the way the handler is looked up is not working
how I would expect. I expect a more fine-grained type mapping to take
precedence over a broader one. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
You are correct the CTH's are keep in a
Map<classType, <jdbcType, CTH>> Hope you understand that :) here is what is registered by default.... register(byte[].class, new
ByteArrayTypeHandler()); register(byte[].class, "BLOB",
new CustomTypeHandler(new BlobTypeHandlerCallback())); register(byte[].class,
"LONGVARBINARY", new CustomTypeHandler(new
BlobTypeHandlerCallback())); To me it looks like the first is getting
called for you. Have you tried to leave the jdbcType attribute out of you
CTH definition? Nathan On Jan 19, 2006, at 1:15 PM, March, Andres
wrote:
ASFAIK, the jdbc type
should match the jdbc type in the sqlmap. That is how the type handler is
called. The db type is NUMERIC and the cal is actually setBigDecimal() as
the type handler’s name infers. My understanding is that
the type handler would be put in a table keyed off of java and jdbc type and
when the sql map matches it invokes the type handler. No? From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Actually I don't think that will work
either. "[B" should be correct. Are you sure that the JDBC type is NUMERIC?
and not something more specific? Nathan On Jan 19, 2006, at 1:00 PM, March, Andres
wrote:
This is the javaType that
works in the sqlmap but not in the sqlconfig – |
- FW: specify typehandler for byte[] March, Andres
- Re: specify typehandler for byte[] Nathan Maves
- RE: specify typehandler for byte[] March, Andres
- RE: specify typehandler for byte[] March, Andres
- Re: specify typehandler for byte[] Nathan Maves
- RE: specify typehandler for byte[] March, Andres
- RE: specify typehandler for byte[] March, Andres