Thanks for the suggestion. Gave it a try but it appears that support
for aliased columns does not run very deep in ActiveRecord.

For example, if you alias obj_id to object_id and then try to do:
Object.find_by_obj_id(3) it complains that the method is unknown.

I did a bit of digging on sqlite3 updateable views and it appears that
this can be accomplished by writing some triggers. Same applies for
postgres and others as well.

Barring an absolutely brilliant suggestion I'm going to pursue this
solution.

Thanks to all,
Mike

On Dec 5, 6:33 pm, Marnen Laibow-Koser <[email protected]> wrote:
> Marnen Laibow-Koser wrote in post #966357:
>
> > Mike B wrote in post #966322:
> >> I would like to be able to support mssql, postgres, oracle, and
> >> sqlite3. My understanding is that updateable views wouldn't work for
> >> sqlite3, but I'll have to do a bit more research.
>
> > Unless I'm badly mistaken, you should just need to use alias_attribute.
> > No DB view is necessary.
>
> ...or not.  I looked at the source of alias_attribute, and I'm not sure
> if it will work. But do try it before messing with DB views.
>
>
>
> >> Thanks for your suggestion.
>
> > Best,
> > -- 
> > Marnen Laibow-Koser
> >http://www.marnen.org
> > [email protected]
>
> > Sent from my iPhone
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to