Hello,
I have also faced same problem on Mysql 5.
http://rifers.org/pipermail/rife-users/2006-January/019250.html

My Exact MySQL Version was 5.0.17. While it is working with 4.0.xx and
4.1.xx

Regards

----- Original Message ----- 
From: "Geert Bevin" <[EMAIL PROTECTED]>
To: "RIFE users list : questions,bug reports and suggestions."
<rife-users@uwyn.com>
Sent: Thursday, February 23, 2006 05:22
Subject: Re: [Rife-users] Problem with boolean in Beans with MySQL ?


Hi Christophe,

I tried with MySQL 4.0.21, 4.1.13 and 5.0.18 and it works correctly
with all those. It would be good to know which exact version you are
using. Maybe you need to upgrade to a later minor release.

Best regards,

Geert

On 22-feb-06, at 20:52, alpheccar wrote:

> Hi Geert,
>
> I have just tested with another version (an old one : 4.1.15) and
> it is working.
> I cannot tell you which version I am using at my office because I
> don't remember but it is a more recent one.
>
> But the difference between both is : in the 4.1.15 the boolean
> field is giving a column TINYINT in the database but in the MySQL
> version I am using at my office for the web site of my team I get a
> BIT column.
>
> With TINYINT the restore is working. With BIT, it is not.
>
> BOOLEAN being synonym for TINYINT(1) in the MySQL documentation, I
> assume getting a BIT column is not right.
>
> Christophe.
>
> Le 22 févr. 06 à 19:44, Geert Bevin a écrit :
>
>> Hi Christophe,
>>
>> first, which version of MySQL are you using?
>>
>> On 22-feb-06, at 19:40, alpheccar wrote:
>>
>>> Hi All,
>>>
>>> I have a problem with a boolean field in a bean and so far I have
>>> been unable to understand why. I hope you have some clues.
>>>
>>> When I create a MySQL table based upon the class of the bean,
>>> then it is working. I have a column of type BIT for the
>>> corresponding boolean field.
>>> When I save objects in the table it is working. When the field is
>>> true I have a bit to 1 in the corresponding column and a zero
>>> otherwise.
>>> When I use some queries filtering (with a where clause) on this
>>> boolean field then it is working.
>>>
>>> But, when I am restoring a bean, I always get false for my
>>> boolean field. So, I had a look to my getters and setters and it
>>> looks like the setter is always called with an argument set to
>>> false so I assume the problem is not in my bean ?
>>>
>>> I have put no constraint on the boolean field.
>>>
>>> I have another related question : when I look at Elephant where
>>> some beans have boolean field, I see that the getter is sometime
>>> written isXXX or getXXX. Both are equivalent ?
>>>
>>> Regards,
>>> Christophe.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ____________________________________________________________________
>>> _______Nouveau : téléphonez moins cher avec Yahoo! Messenger !
>>> Découvez les tarifs exceptionnels pour appeler la France et
>>> l'international.
>>> Téléchargez sur http://fr.messenger.yahoo.com
>>> _______________________________________________
>>> Rife-users mailing list
>>> Rife-users@uwyn.com
>>> http://lists.uwyn.com/mailman/listinfo/rife-users
>>>
>>
>> --
>> Geert Bevin                       Uwyn bvba
>> "Use what you need"               Avenue de Scailmont 34
>> http://www.uwyn.com               7170 Manage, Belgium
>> gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03
>>
>> PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
>> Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
>>
>>
>> _______________________________________________
>> Rife-users mailing list
>> Rife-users@uwyn.com
>> http://lists.uwyn.com/mailman/listinfo/rife-users
>
>
>
>
>
>
> ______________________________________________________________________
> _____
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez
> les tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.com
> _______________________________________________
> Rife-users mailing list
> Rife-users@uwyn.com
> http://lists.uwyn.com/mailman/listinfo/rife-users
>

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to