ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karen Koch <kmk...@sbcglobal.net>
Subject Re: resultClass for BLOB field
Date Mon, 18 Dec 2006 17:00:24 GMT
Re: your comments, Clinton, the field is not huge, and I just want to grab a stored encrypted
password in order to decrypt it and compare to the user-entered password (part of a login

Now, my latest problem: substituting "byte[]" in for the resultClass yields a java.lang.ClassNotFoundException
exception for byte[].  (I forgot to mention having already attempted that.)

<select id="getEncryptedPassword" resultClass="byte[]" parameterClass="string">
        SELECT Password FROM EPLoginAccount WHERE EmailAddr = #value#

Perhaps I'm not familiar with how to return an array from a statement.  A bit of help?

Thanks again,

Clinton Begin <clinton.begin@gmail.com> wrote: Right.  We don't make use of the JDBC
Blob/Clob classes.  So you have to use a byte[] (byte array).

However, if your BLOB is huge, you might want to stream it directly to disk, or even directly
to the browser.  In this case you'll want to bypass iBATIS, as it likely doesn't make sense
to map huge data structures to anything resident in memory. 


On 12/18/06, Karen Koch <kmkoch@sbcglobal.net> wrote: Hello --

I think this is a simple one:  What is the proper resultClass to use when returning only a
single column (of BLOB type) as the result of a statement?  SqlMaps doesn't seem to like "BLOB".

  <select id="getEncryptedPassword" resultClass=??? parameterClass="string">
        SELECT Password FROM EPLoginAccount WHERE EmailAddr = #value#

 Karen Koch


View raw message