Subject: | Error in documentation of DBIx::Class::Relationship belongs_to() |
belongs_to() is documented as:
Show quoted text
> Arguments: $accessor_name, $related_class, $foreign_key_column|$cond?,
$attr?
but it seems the third parameter should be "$self_key_column". I'd say
the complete chapter for belongs_to() was copy&pasted from has_many()...
BTW, I'd think it would be a good idea to include some examples where
the foreign key column and the primary key column of the referred table
do not have the same name. (e.g. CREATE TABLE boss (id INTEGER NOT NULL,
PRIMARY KEY(id)); CREATE TABLE worker (id INTEGER NOT NULL, boss INTEGER
NOT NULL, PRIMARY KEY(id), FOREIGN KEY boss REFERENCES boss(id);)