X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=4b6ec4588902dea6d4f51fb112f3cc6a41c1c0a9;hb=f1f5af1d8ceae297c79a0a87d8a99ff6ffb63e42;hp=1b9baa87a98e3fd0e889c17160ec3b775994bdc1;hpb=1225a9e084996e5ea316705fa5e2c024e1644954;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 1b9baa8..4b6ec45 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -503,6 +503,16 @@ sub primary_columns { return @{shift->_primaries||[]}; } +sub _pri_cols { + my $self = shift; + my @pcols = $self->primary_columns + or $self->throw_exception (sprintf( + 'Operation requires a primary key to be declared on %s via set_primary_key', + ref $self, + )); + return @pcols; +} + =head2 add_unique_constraint =over 4 @@ -1565,7 +1575,7 @@ Creates a new ResultSource object. Not normally called directly by end users. __PACKAGE__->column_info_from_storage(1); Enables the on-demand automatic loading of the above column -metadata from storage as neccesary. This is *deprecated*, and +metadata from storage as necessary. This is *deprecated*, and should not be used. It will be removed before 1.0.