Howard Yeh wrote: [...] > The particular case is for a has_many association, but I want to avoid > the overhead of having two indices.
That strikes me as a foolish premature optimization, rather like saying that you don't want headlights on your car because they take too much power from the engine. :) > > It'll be insertion only, so duplicate foreign key is acceptable. Well, of course duplicate foreign keys would be acceptable. But what do you mean by "insertion only"? Do you mean you'll never be reading from the table? If so, why have it? > > The association has the bag semantics. I'm not familiar with that term. What do you mean? > > If this doesn't work, what's "create_table :id => false" ever used > for? For tables without AR models. In a typical Rails app, that would only be habtm join tables. AR wants a primary key, and in any case, it's poor practice not to have one, even if it's composite. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://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 -~----------~----~----~----~------~----~------~--~---

