1DBIx::Class::PK(3)    User Contributed Perl Documentation   DBIx::Class::PK(3)
2
3
4

NAME

6       DBIx::Class::PK - Primary Key class
7

SYNOPSIS

DESCRIPTION

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

METHODS

14   id
15       Returns the primary key(s) for a row. Can't be called as a class
16       method.
17
18   ID
19       Returns a unique id string identifying a result object by primary key.
20       Used by DBIx::Class::CDBICompat::LiveObjectIndex and
21       DBIx::Class::ObjectCache.
22
23       WARNING
24           The default "_create_ID" method used by this function orders the
25           returned values by the alphabetical order of the primary column
26           names, unlike the "id" method, which follows the same order in
27           which columns were fed to "set_primary_key" in
28           DBIx::Class::ResultSource.
29
30   ident_condition
31         my $cond = $result_source->ident_condition();
32
33         my $cond = $result_source->ident_condition('alias');
34
35       Produces a condition hash to locate a row based on the primary key(s).
36

FURTHER QUESTIONS?

38       Check the list of additional DBIC resources.
39
41       This module is free software copyright by the DBIx::Class (DBIC)
42       authors. You can redistribute it and/or modify it under the same terms
43       as the DBIx::Class library.
44
45
46
47perl v5.38.0                      2023-07-20                DBIx::Class::PK(3)
Impressum