adding default name, for dbs that dont expose a PK

This commit is contained in:
Ceeram 2011-12-01 20:30:36 +01:00
parent b5c4b85601
commit 0a1772c929

View file

@ -298,6 +298,7 @@ class ModelTask extends BakeTask {
* @return string Name of field that is a primary key.
*/
public function findPrimaryKey($fields) {
$name = 'id';
foreach ($fields as $name => $field) {
if (isset($field['key']) && $field['key'] == 'primary') {
break;