[Solar-svn] Revision 2757

pmjones at solarphp.com pmjones at solarphp.com
Tue Sep 18 20:25:21 CDT 2007


branch: Solar_Form_Load_Model: [CHG] Form elements not in the table columns are now allowed (e.g. calculated columns).



Modified: branches/orm/Solar/Form/Load/Model.php
===================================================================
--- branches/orm/Solar/Form/Load/Model.php	2007-09-17 14:11:30 UTC (rev 2756)
+++ branches/orm/Solar/Form/Load/Model.php	2007-09-19 01:25:21 UTC (rev 2757)
@@ -79,9 +79,15 @@
                 settype($info, 'array');
             }
             
-            // is the column name in the model?
+            // is the column name in the model table?
             if (empty($cols[$name])) {
-                continue;
+                // not in the table, fake some elements
+                $cols[$name] = array(
+                    'primary' => false,
+                    'require' => false,
+                    'type'    => 'text',
+                    'size'    => false,
+                );
             }
             
             // initial set of element info based on the model column




More information about the Solar-svn mailing list