I would like to know which is the functionality of the $_table_columns array on a KOHANA model.
I ask this since the table's columns are loaded by introspection, what is the use of this array, is it for default values to the properties?
I would like to know which is the functionality of the $_table_columns array on a KOHANA model.
I ask this since the table's columns are loaded by introspection, what is the use of this array, is it for default values to the properties?
$_table_columnsreflects your table column structure. So if your table has 3 columns (id, name, desc),$_table_columnswill be setup toarray('id' => '', 'name' => '', 'desc' => '').By default
$_table_columnsis an empty array. When you extend ORM with your class and don't override$_table_columns, it will be automatically filled by ORM by callingSHOW FULL COLUMNS FROM table_namecommand. If you want to avoid this additional DB call, you can initialize$_table_columnson your own:Check here for more details.