Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 33013
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: JACOB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08009
Fixed in: (no value)



Subject: Error in documentation of DBIx::Class::Relationship belongs_to()
Download (untitled) / with headers
text/plain 612b
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);)
Subject: Re: [rt.cpan.org #33013] Error in documentation of DBIx::Class::Relationship belongs_to()
Date: Sat, 9 Feb 2008 14:57:37 +0000
To: JACOB via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcatsystems.co.uk>
Download (untitled) / with headers
text/plain 1.4k
On Fri, Feb 08, 2008 at 08:23:46AM -0500, JACOB via RT wrote: Show quoted text
> > Fri Feb 08 08:23:45 2008: Request 33013 was acted upon. > Transaction: Ticket created by JACOB > Queue: DBIx-Class > Subject: Error in documentation of DBIx::Class::Relationship belongs_to() > Broken in: 0.08009 > Severity: Normal > Owner: Nobody > Requestors: JACOB@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=33013 > > > > belongs_to() is documented as: >
> > 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);)
Write up a few and send 'em then - we'd be delighted to take a doc patch. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
Changing status as documentation volunteer went AWOL.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.