Forum: Ruby on Rails what to do when Rails generated select statements don't work

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
066f3c15ffe4783f42a2d36d31a643b7?d=identicon&s=25 eriklane (Guest)
on 2007-03-29 04:33
(Received via mailing list)
Running FC6 with RoR 1.1.6
I'm using a custom type called 'uuid' based on code from this project.

Here's a description of the ksessions table.

 Table "public.ksessions"
   Column    |           Type           |
 title       | text                     | not null
 description | text                     | not null
 public      | boolean                  | not null default false
 id          | uuid                     | not null default uuid_time()
 user_id     | uuid                     | not null

Here's the automatically generated SQL that returns 0 rows...

kapture_development=> select ksessions."id" from ksessions where
(ksessions."id" = '67794c52-d0cd-11db-9a81-000d5679aec6');
(0 rows)

Here's my SQL that returns the exact row I'm looking for...

kapture_development=> select ksessions."id" from ksessions where
uuid_eq(ksessions."id",'67794c52-d0cd-11db-9a81-000d5679aec6') = '1';
(1 row)

Where in the world do I fix this?  I imagine I need to tell something
use this uuid_eq function instead of the '=' operator for each
comparison/look up.

I'm guessing this involves messing with Rails or Active_RBAC somehow.

Any thoughts would be appreciated.
This topic is locked and can not be replied to.