DBIx::Class::PK(3pm)

DBIx::Class::PK3pm

Primary key class

Overview

This class contains methods for handling primary keys and methods depending on them.

Methods

id

Returns the primary key(s) for a row. Can't be called as a class method.

ID

Returns a unique id string identifying a result object by primary key. Used by DBIx::Class::CDBICompat::LiveObjectIndex and DBIx::Class::ObjectCache.

WARNING

The default "_create_ID" method used by this function orders the returned values by the alphabetical order of the primary column names, unlike the "id" method, which follows the same order in which columns were fed to "set_primary_key" in DBIx::Class::ResultSource.

ident_condition

  my $cond = $result_source->ident_condition();
  my $cond = $result_source->ident_condition('alias');

Produces a condition hash to locate a row based on the primary key(s).

Further questions?

Check the list of additional DBIC resources.

Releases

10 releases since Debian 4.0 (Etch); the text changed 8 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10–11
  8. 12
  9. 13

From libdbix-class-perl 0.082844-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.