So you need a join table that contains: LEGACY_SYSTEM_ID2 |
CONTACT_ID : as fields in which the two fields do NOT use the same ID?

On Nov 12, 6:10 pm, Auch <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have limited success with rails and am trying very hard to
> understand the MVC, DRY and RESTful concepts that Rails supports.
>
> What I am trying to do is to automate some data manipulation
> procedures for legacy systems. I have three tables that I need to
> import into the Rails application.
>
> Table 1
> Legacy_System_ID1, Agency_Business_Number, Agency_Name
> belongs to Table 3
> belongs to Table 1
>
> Table 2
> Legacy_System_ID2, Legacy_System_ID1, Legacy_System_Contact_ID,
> Agency_Business_Number, Agency_name
> has many Table 1
>
> Table 3
> Agency_Business_Number, Agency_Name.
> has many Table 1
>
> These files are all in csv format. What I am having trouble with is
> the concept of primary key ids. Rails does not like primary keys that
> are not incremental. I know I can set the primary key to
> Legacy_System_ID1 in Table 1 and set the foreign key to the same ID in
> Table 2.
>
> The pinch is that I need to seperate the contact_ID from the
> Legacy_System_ID2 of Table 2 into two tables and also add new entries
> into Table 3, which is essentially a subset of Table 1 to keep track
> of which Agencies with unique Agency_Business_Numbers are registered.
>
> Whats the best way to go about this in Rails? I am experimenting with
> Instant Rails 2.02

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to