diff --git a/examples/forum.yml b/examples/forum.yml new file mode 100644 index 0000000..f800b20 --- /dev/null +++ b/examples/forum.yml @@ -0,0 +1,48 @@ +--- +Forum_Model_Category: + columns: + name: string(50) + description: string(99999) + +Forum_Model_Board: + columns: + category_id: integer(10) + name: string(100) + description: string(5000) + relations: + Category: + class: Forum_Model_Category + local: category_id + foreign: id + Threads: + class: Forum_Model_Thread + local: id + foreign: board_id + +Forum_Model_Entry: + columns: + author: string(100) + message: string(99999) + thread_id: integer(10) + date: integer(10) + relations: + Thread: + class: Forum_Model_Thread + local: thread_id + foreign: id + +Forum_Model_Thread: + columns: + topic: string(100) + board_id: integer(10) + updated: integer(10) + closed: integer(1) + relations: + Board: + class: Forum_Model_Board + local: board_id + foreign: id + Entries: + class: Forum_Model_Entry + local: id + foreign: thread_id \ No newline at end of file diff --git a/library/ZFDoctrine/Form/Model.php b/library/ZFDoctrine/Form/Model.php index 98e3bdc..1a3cc4a 100644 --- a/library/ZFDoctrine/Form/Model.php +++ b/library/ZFDoctrine/Form/Model.php @@ -292,7 +292,9 @@ protected function _columnsToFields() $field->setRequired(true); } - $field->setLabel($label); + if ($type != 'hidden') { + $field->setLabel($label); + } if($type == 'select' && $definition['type'] == 'enum') { foreach($definition['values'] as $text) {