Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel] MySQL: Bit fields

Discussion topic

Back to topic list

Re: [propel] MySQL: Bit fields


Author hlellelid
Full name Hans Lellelid
Date 2008-08-22 07:50:47 PDT
Message Thanks, Thomas -- I'm cross-posting this reply to the dev list. Your
solution sounds like it would be useful to others; I think we can add that
in. In the meantime, if you want to make sure you can keep Propel
up-to-date, you could subclass the PHP5ObjectBuilder and specify that you
want to use your subclass as the builder (see the build.properties
reference in docs:


On Fri, 22 Aug 2008 16:40:15 +0200, Thomas Ritter <th dot ritter at gmx dot net>
> Am Freitag 22 August 2008 03:50:48 schrieb Hans Lellelid:
>> Yeah, take a look at the hydrate() method in the Base object -- and the
>> addHydrateBody() method in the PHP5ObjectBuilder class
>> If you come up with what you feel is a generic solution we can consider
>> it for inclusion.
> Yapp, that does it. I chose
> $col->getDomain(​)->getSqlType() == 'BIT' &&
> $col->getPhpType() == "boolean"
> as Mysql supports bit fields.
> as condition and wrapped the value in the PHP function ord(), which gives
> the
> ASCII value, and that is exactly what we want. Consistent with other
> boolean
> values in propel, this supports only the first bit of that bit field.
> I didn't update the reverse engineering stuff, but it works like a charm
> this
> way. Many thanks and I attached a subversion diff to the file in the 1.3
> branch, as noted on the propel website.
> Hans, shall I crosspost this to the developer mailing list, or will you
> that stuff?
> And thanks for the help,
> Thomas Ritter
> --
> You kids and your fancy Telnet clients.
> In my day, we had to carry the bits by hand to the server and back
> (betcha didn't know that's where the term 'carry bit' originally
> came from, didja??), uphill, BOTH WAYS, in 10 feet of snow! And we
> LIKED it! Packet loss meant you'd been trampled by a horse.
> Slashdot Reader "warith"

« Previous message in topic | 1 of 1 | Next message in topic »


Show all messages in topic

Re: [propel] MySQL: Bit fields hlellelid Hans Lellelid 2008-08-22 07:50:47 PDT
Messages per page: