Results 1 to 2 of 2

Thread: Boolean properties and iBatis SqlMaps

  1. #1
    Join Date
    Oct 2004
    Location
    Sydney, Australia
    Posts
    46

    Default Boolean properties and iBatis SqlMaps

    Hi all,

    Does anyone know whether it is possible to map a char column in the database which has values of 'Y' and 'N' to a boolean value in a JavaBean using Spring and iBatis SqlMaps? Currently it is failing and giving me a NumberFormatException, which I assume means that it expects boolean fields to be stored as 1 or 0 in the database. Is there some way that I can interpose some code to do this conversion?

    Oh, and changing the database isn't an option, I'm afraid.

    Thanks.

    Geoff

  2. #2
    Join Date
    Oct 2004
    Location
    Sydney, Australia
    Posts
    46

    Default

    Never mind, I've figured this out. iBatis has custom type handler support which i can use to do this.

Similar Threads

  1. Transaction Proxy Causing NPE W/ Ibatis
    By reuben in forum Data
    Replies: 1
    Last Post: Oct 18th, 2005, 03:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •