On Fri, Aug 13, 2004 at 17:17:10 +0100,
Matt Clark <matt@ymogen.net> wrote:
> > > It is likely that you are missing an index on one of those foreign
> > > key'd items.
> >
> > I don't think that is too likely as a foreign key reference
> > must be a unique key which would have an index.
>
> I think you must be thinking of primary keys, not foreign keys. All
> one-to-many relationships have non-unique foreign keys.
The target of the reference needs to have at least a unique index.
I am not sure if it needs to actually be declared as either a unique
or primary key, though that is the intention.
The records doing the referencing don't need (and normally aren't)
unique.