From 08cf88bbf01449ccda79b4c0ca87f9f3c99b9c4d Mon Sep 17 00:00:00 2001 From: avl Date: Tue, 19 Aug 2008 07:54:20 +0300 Subject: [PATCH] Model Choice Field --- ipf/orm/export.php | 1 - ipf/orm/record.php | 8 +++++++- ipf/orm/table.php | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ipf/orm/export.php b/ipf/orm/export.php index 7f5911b..27f4dd3 100644 --- a/ipf/orm/export.php +++ b/ipf/orm/export.php @@ -363,7 +363,6 @@ class IPF_ORM_Export extends IPF_ORM_Connection_Module { $sql = $this->getForeignKeyBaseDeclaration($definition); $sql .= $this->getAdvancedForeignKeyOptions($definition); - return $sql; } diff --git a/ipf/orm/record.php b/ipf/orm/record.php index 325e42d..7b2b03c 100644 --- a/ipf/orm/record.php +++ b/ipf/orm/record.php @@ -1259,8 +1259,14 @@ abstract class IPF_ORM_Record extends IPF_ORM_Record_Abstract implements Countab function SetFromFormData($cleaned_values) { + //$relations = $this->getTable()->getRelations(); foreach ($cleaned_values as $key=>$val) { - $this->$key = $val; + /* + if (array_key_exists($key,$relations)){ + + + }else*/ + $this->$key = $val; } } } \ No newline at end of file diff --git a/ipf/orm/table.php b/ipf/orm/table.php index 05ea8d5..6403fa8 100644 --- a/ipf/orm/table.php +++ b/ipf/orm/table.php @@ -408,7 +408,7 @@ class IPF_ORM_Table extends IPF_ORM_Configurable implements Countable } $options['primary'] = $primary; - + return array('tableName' => $this->getOption('tableName'), 'columns' => $columns, 'options' => array_merge($this->getOptions(), $options)); -- 2.49.0