views:

40

answers:

1

I'm working on a rails3 login using Authlogic and Authlogic-oid, with activerecord-oracle_enhanced-adapter, and user/session code pretty much like Holden's demo on github.

When I have a session table, I get this error, because there are no quotes around "session":

ActiveRecord::StatementInvalid (OCIError: ORA-00903: 
invalid table name: SELECT data FROM session WHERE id = 3 FOR UPDATE)

When I rename session to user_session, the sql is still looking for a session table:

ActionView::Template::Error ("DESC session" failed; does it exist?):

Session is a reserved word in oracle. I don't see a set_table_name method in AuthlogicOpenid::Session. For other tables, the activerecord adapter generates quoted sql, like this: create table "session", but that isn't happening here for some reason.

Any ideas for working around this? Thanks,

A: 

I ended up turning on plural table names, and calling set_table_name for the rest of my tables.

config.active_record.pluralize_table_names = true
Brian Maltzan