[Rails] Re: Rails without a primary key
Michael Artz
mlartz at gmail.com
Thu Jul 27 09:15:15 GMT 2006
> Just to be clear, having a unique integer column (such as that
> provided by MySQL's AUTOINCREMENT or Postgres' SERIAL columns) is
> only one way to guarantee row uniqueness. The caveat is that this is
> the way required by stock Rails to uniquely identify rows. Another
> way is to enforce uniqueness on a single column of some other type,
> or use a composite key to guarantee the uniqueness of some
> combination of columns.
Yeah, I guess I should have been a bit clearer. I don't have an
integer, single-column primary key, however the rows are unique over
multiple columns. Know of any way to "solve" this without a DB view?
More information about the Rails
mailing list