diff options
author | Luis Ramón López <[email protected]> | 2014-01-03 00:43:26 +0100 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2014-04-26 13:33:06 +0100 |
commit | 73f00fd6966570357196e0da51cf933490d230c3 (patch) | |
tree | c3fcdf3992dbee54fd20e167e2ef9aeed418470c /docs/configuration.rst | |
parent | 71f975aa7b6bd23049a11c289d569a0f666ea312 (diff) |
Document the new compound primary keys behaviour and features
Diffstat (limited to 'docs/configuration.rst')
-rw-r--r-- | docs/configuration.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/configuration.rst b/docs/configuration.rst index 2b74a88..dba0c8c 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -197,6 +197,16 @@ all tables. If your ID column is called ``primary_key``, use: <?php ORM::configure('id_column', 'primary_key'); +You can specify a compound primary key using an array: + +.. code-block:: php + + <?php + ORM::configure('id_column', array('pk_1', 'pk_2')); + +Note: If you use a auto-increment column in the compound primary key then it +should be the first one defined into the array. + Setting: ``id_column_overrides`` This setting is used to specify the primary key column name for each @@ -212,6 +222,9 @@ the table, you can use the following configuration: 'role' => 'role_id', )); +As with ``id_column`` setting, you can specify a compound primary key +using an array. + Limit clause style ^^^^^^^^^^^^^^^^^^ |