This is the javaType that works in the sqlmap
but not in the sqlconfig – [B I will try [Ljava.lang.Byte Guess I forwarded an incomplete thread: Well, I learned something new today – the
internal representation of class names. This mapping does not fail like
before: <typeHandler javaType="[B" jdbcType="NUMERIC" callback="com.soe.freerealms.dao.ibatis.ByteArrayBigDecimalTypeHandler"/>
But it is not being called for my byte[]
properties. The existing byte array type handler is instead. Any
clues as how to fix this? From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Andres, I think you might have your javaType attribute wrong. Can you try
"[Ljava.lang.Byte" and let me know if that works for you. Nathan On Jan 19, 2006, at 11:45 AM, March, Andres wrote:
Got no closure on this issue on the
users list. I do believe it is a bug but I couldn’t locate it in the
source myself, since I’m not familiar with it. If you guys concur, I can
open a JIRA issue. From: March, Andres [mailto:[EMAIL PROTECTED]] I want to emphasize that
this works when I specify the handler per column in the sqlmap parameter map
because I don’t need to specify the javaType there. But I want to specify
it globally, so I don’t have to create parameterMaps and typeHandler
declarations for every column. My class has a property
like this: Private ds byte[ ] The db tables are like
this: CREATE TABLE
bugs.x86_seg_reg ( id int8 NOT NULL
DEFAULT nextval('x86_seg_reg_id_seq'::regclass), ds numeric(16) NOT
NULL, es numeric(16) NOT
NULL, fs numeric(16) NOT
NULL, gs numeric(16) NOT
NULL, CONSTRAINT
x86_seg_reg_pkey PRIMARY KEY (id) ) The sql created from the
default type handler does setBytes() but Postgres interprets that as a bytea
column type. So I created my own type handler: typeHandler =jdbcType"NUMERIC"
=/> typeHandler jdbcType=javaType="com.soe.freerealms.dao.ibatis.ByteArrayBigDecimalTypeHandler" |
- 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