| Sanjay,
What is the column type in the database?
Nathan
On Sep 19, 2005, at 6:48 AM, Sanjay Goel wrote: The result map looks like this: <resultMap class="AuditVO" id="audit"> <result property="id" column="TF_AUDIT_ID"></result> <result property="accId" column="SS_CLIENT_ACC_ID"></result> <result property="message" column="CHAR_DATA"></result> </resultMap>
and AuditVO class has private Integer id; private int accId; private byte [] message; and the getter setter methods. the querys are <select id="getAudit" resultMap="audit" parameterClass="AuditVO" > SELECT TF_AUDIT_ID, SS_CLIENT_ACC_ID, CHAR_DATA FROM tf_audit WHERE TF_AUDIT_ID = #id# </select> <insert id="insertAudit" parameterClass="AuditVO"> INSERT INTO tf_audit (TF_AUDIT_ID, SS_CLIENT_ACC_ID, CHAR_DATA, LAST_UPDATED) VALUES ( #id# , #accId# , #message# , SYSDATE ) </insert> <update id="updateAudit" parameterClass="AuditVO"> UPDATE tf_audit SET CHAR_DATA=#message# WHERE TF_AUDIT_ID=#id# </update>
On 9/19/05, Daniel Henrique Ferreira e Silva <[EMAIL PROTECTED]> wrote: Sanjay,
Are you using a custom type handler? How are your config map files?
Cheers, Daniel Silva.
On 9/19/05, Sanjay Goel <[EMAIL PROTECTED]> wrote: > Hi, > I am trying a save a String in an oracle BLOB object (I know String can be > mapped to CLOB, but lets say I can't use CLOB) ... > I have a VO with a field as byte [] which is mapped to the BLOB. I do a > String.getBytes() to get the byte array and save it in BLOB and retrieve it > using new String(byte []) ... > the problem is, the string returned is garbage. Anyone has an idea why this > happens ? > Regards, > Sanjay >
|
- Re: Problem with BLOB Nathan Maves
-