8 Replies Latest reply on Sep 26, 2007 4:19 PM by Dustin Norlander

    boolean types mapped to bit in MySQL 5 not working with EJB3

    Waseem Quraishi Newbie

      I have an entity bean with a boolean column called active. The database table stores it as a bit(1). I see all the values have a b. I can't seem to update these regardless of what I do.

      So for example:
      My object has an attribute status of type boolean.
      I create the object, set it to false and call em.persist. The value in the db is b.
      I create the object, set it to false and call em.persist. The value is still b.

      I was thinking of changing it to an int and doing the conversion myself but there has to be a way to get this work without mucking up the code.

      Thanks for your help!