From: avl Date: Tue, 19 Aug 2008 04:54:20 +0000 (+0300) Subject: Model Choice Field X-Git-Tag: 0.6~185 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=08cf88bbf01449ccda79b4c0ca87f9f3c99b9c4d;p=ipf-legacy-orm.git Model Choice Field --- 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));