A has_many Bs where B has no primary key
问题 I've got models A and B; A has_many B, and B belongs_to A. So far, so good—except, I specify that B doesn't have a primary key. I don't plan to ever modify or delete individual B rows, and I expect to have several million to billion of them, so omitting the primary key will be really handy, space-wise. The migration to create B's table looked like this: class CreateBs < ActiveRecord::Migration def change create_table :bs, {:id => false} do |t| # … rest of fields … end end end Unfortunately,