Skip Menu |

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

Report information
The Basics
Id: 115253
Status: open
Priority: 0/
Queue: DBIx-Class

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

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



Subject: documentation error, re add_columns/is_nullable
The documentation in lib/DBIx/Class/ResultSource.pm for add_columns -> is_nullable says "This is currently only used to create tables from your schema, see L<DBIx::Class::Schema/deploy>." And yet, after I added this flag to some columns so I could introspect them for my own purposes, I got errors: "DBIx::Class::Relationship::HasOne::_validate_has_one_condition(): "might_have/has_one" must not be on columns with is_nullable set to true (modulename/columnname). This might indicate an incorrect use of those relationship helpers instead of belongs_to." And then I would have to disagree that a might_have relationship should not be permitted for nullable columns -- after all, it's a "might have" because if this column is null, then there is no related row! What technical purpose does this restriction serve?
On 2016-06-10 15:44:46, ETHER wrote: Show quoted text
> And then I would have to disagree that a might_have relationship > should not be permitted for nullable columns -- after all, it's a > "might have" because if this column is null, then there is no related > row! What technical purpose does this restriction serve?
Ok, on closer inspection I do see that these might_have relationships could be switched to belongs_to with no loss of functionality... so let's not dwell on this bit of my comments.
Subject: Re: [rt.cpan.org #115253] documentation error, re add_columns/is_nullable
Date: Sat, 11 Jun 2016 09:07:37 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
On 06/11/2016 12:44 AM, Karen Etheridge via RT wrote: Show quoted text
> The documentation in lib/DBIx/Class/ResultSource.pm for add_columns -> is_nullable says "This is currently only used to create tables from your schema, see L<DBIx::Class::Schema/deploy>."
This is indeed incorrect as of late, and I have some preliminary text addressing this. This will be addressed v. soon.