j4mie / paris

A lightweight Active Record implementation for PHP5, built on top of Idiorm.
http://j4mie.github.com/idiormandparis/
996 stars 131 forks source link

Handling of multi column primary keys #76

Closed rrelmy closed 10 years ago

rrelmy commented 11 years ago

Is there a possibility to use paris with tables which have an primary key containing multiple columns?

Sample table

CREATE TABLE IF NOT EXISTS `shop_cart_item_config` (
    `item_id` int(10) unsigned NOT NULL,
    `language` varchar(8) NOT NULL,
    `quantity` int(10) unsigned DEFAULT '0',
    PRIMARY KEY (`item_id`,`language`)
)
treffynnon commented 11 years ago

There isn't any support for compound keys in Idiorm or Paris at the moment. There is a pull request (https://github.com/j4mie/idiorm/pull/161) currently pending review for inclusion in Idiorm, but any potential support in Paris is yet to be considered.