Tolga Erdogus wrote:> Hi,
>
> Since mysql now support uptable view and since we already have a db
> structure that doesn’t conform to the activerecord db naming
> conventions, we came up with a solution:
>
> We keep our tables exactly as they are but create an updatable view for
> each one with column names conforming to the active record standards.
>
> This works nicely for select, insert and deletes but not for updates. I
> am not a ruby guy, but my theory is that ruby rails can’t deal with meta
> data for updatable views yet.
>
> And even though it expects the primary key to be named “id” it still
> looks for meta data that points to the primary key and can’t find it.
>
> Any ideas on how to get our views to work just like tables?
I haven''t gotten to the point of updating my views in rails yet, but it
would be
very unfortunate if it doesn''t work.
Could you give some more details about the tables and views definitions, the
ruby-code of the model and how you tried to update it in rails?
And what happens when you update? Just nothing, or do you get an error?