Are those fields defined as boolean in your schema?
Anyway, if you put your code in the correct model class, it's not
overwritten at every generation.

cheers
Massimiliano

On 17 Mar, 14:18, SlimShaggy <filthy.m...@gmail.com> wrote:
> Hello all,
> I am currently migrating an app from Symphony 1.2 to 1.4
> I am using an sqlite db and I encountered a problem with the generated
> queries regarding booleans.
>
> Here is a part of my source code:
> $c = new Criteria();
> $c->add(ShowPeer::IS_PUBLISHED,true);
> $c->add(ShowPeer::IS_CANCELED,false);
>
> And here is the generated SQL query:
> SELECT DISTINCT show.ID, show.TITLE, (...)
> WHERE show.IS_PUBLISHED=true AND show.IS_CANCELED=false (...)
>
> What used to retrieve the data I was looking for no longer works!
> No error generated, just an empty result. On the other end, if I copy
> & paste the query in sqlitebrowser I do get an error:
> no such column: true
>
> That is, booleans don't exist in Sqlite they are just treated as
> integers. It all work fine if I convert true->1 and false->0 in the
> SQL. How comes Sf/propel can't handle this anymore ?
>
> I tryed to mess around, changing my criteria to
> $c->add(ShowPeer::IS_PUBLISHED,'1');
> $c->add(ShowPeer::IS_CANCELED,'0');
> But even after cleaning the cache it's still generating the same
> query.
>
> Any clue, someone ? This is driving me nuts!!!!
>
> Vince

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to