Skip to content

Commit

Permalink
adding default name, for dbs that dont expose a PK
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Dec 1, 2011
1 parent b5c4b85 commit 0a1772c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Console/Command/Task/ModelTask.php
Expand Up @@ -298,6 +298,7 @@ protected function _printAssociation($modelName, $type, $associations) {
* @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;
Expand Down

0 comments on commit 0a1772c

Please sign in to comment.