Hi,

I have looked around quite a bit, and haven't found any workable
solution to this.


I am accessing an external/remote database from my rails app, in order
to update a categories table.

I cannot change the table structure of the remote database.  it has a
categories table with an id field but has a one to one relationship
with a descriptions table.

The descriptions table has no primary key, only a categories_id.

Setting up a one-to-one relationship in my model allows me to load the
description along with the category.  But I need to be able to create
a new category and description and cannot find a way around creating
an ActiveRecord object without a primary key.

Grateful for any suggestion of how to do this.  I am wondering if I
can use sql from within the model, but not quite sure how this would
be done.

Tony

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to