Chris Blackwell
Fri, 10 Nov 2006 10:26:38 -0800
We just set the column type to BOOLEAN in MySQL 5 (although it later magically becomes TINYINT(1)), and pass ColdFusion boolean values with no issues whatsoever.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shuck
Sent: 10 November 2006 17:28
To: reactor@doughughes.net
Subject: Re: [Reactor for CF] boolean vlaues in mysql
~Dave
On 11/10/06, Chris Blackwell <[EMAIL PROTECTED]> wrote:
How are people representing boolean values in mysql (4 or 5) with
reactor? I've always used TINYINT(1) but with reactor its causing a
problem because, by default, it validates the field as numeric so I get
an invalidType error.
I've tried the BIT(1) datatype for MySQL5, but CF can't convert the
value to a boolean, I'm actually not sure what this returns now, it used
to be a synonym for TINYINT(1).
BOOL/BOOLEAN are converted to TINYINT(1) by MySQL so those type are
useless, the mysql ObjectDAO will never see this type.
For now I'm overriding the setColumn(bool) to convert the boolean to 1/0
and call super.setColumn(int).
I've only just run into this issue as I've started using Reactors
validation instead of my own.
Chris Blackwell
Web Developer
Telephone: +44 (0)117 373 1465
Email: [EMAIL PROTECTED]
This email is intended for the use of the named recipient(s) only. Any
information contained within this message or any of its attachments may
be confidential and privileged information. Any unauthorized
disclosure, reproduction, distribution or other dissemination or use of
this communication is strictly prohibited.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
reactor@doughughes.net
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com
Where's your Spot?
www.instantspot.com
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
reactor@doughughes.net
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --