Reputation: 18273
I am learning about ORM. I studied Jelly and now I'm testing the Kohana's built in ORM module. As I see the ORM model is quering:
SHOW FULL COLUMNS FROM `table_name`
every time you instantiate an ORM model. For example:
for
$user = ORM::factory('user');
ORM is quering:
SHOW FULL COLUMNS FROM `users`
Is there a way to define this table columns/model properties in my model, so ORM don't have to make a db query to obtain them?
Thank you!
Upvotes: 1
Views: 792
Reputation: 18273
I got it, studying the ORM's source code :)
You can set:
protected $_table_columns;
Upvotes: 2