J
jim
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?
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?