On Tue, 5 Oct 2004 jim / freeze.org wrote:

> David
>
> I was tripped up for a period of time when Rails was complaining
> about an update to a table. The problem SQL query was:
>
>    UPDATE
>      group = 'test'
>    WHEN id='1'
>
> The problem is that (I guess) group is a keyword. So I fixed this by
> changing the name of the group field:
>
>    UPDATE
>      grp = 'test'
>    WHEN id='1'
>
> However, since rails seems to be catering to us 'dummies', it would be nice
> if rails had generated the following SQL query:
>
>
>    UPDATE
>      posts.group = 'test'
>    WHEN id='1'
>
> where posts is the name of the table.
> This would have insulated me from having to avoid using
> 'bad' column names.
>
> Does this sound like a reasonable change to make?

does rails support sqlite?

jib:~ > sqlite db 'create table t(x);insert into t values (42);update t set t.x=42;'
SQL error: near ".": syntax error


-a
--
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. 
|   --Dogen
===============================================================================