gilbitron / Arrest-MySQL

A "plug-n-play" RESTful API for your MySQL database.
131 stars 219 forks source link

multi column primary keys not supported #5

Open stitch opened 11 years ago

stitch commented 11 years ago

Hi,

The API does not support multi column primary keys. Is there a way to work with this still without changing the database?

Example: $arrest->set_table_index('part', 'system','part number'); or $arrest->set_table_index('lulz_stash_console_part', array('system','part number'));

Regards, Elger

ludesign commented 11 years ago

The code is written in a way assuming there will be one primary key per table and it will be an int (possibly autoincrement), as can be seen in the code.

$id = intval($this->segment(1));

Fix is possible. If you just want a quick fix I might implement it; but as I think this project is lacking a lot of features I am looking for, a new project is the way to go.