Аналогично Zend_Db_Table, связи не поддерживаются
Из обязательного - статический instance, имя таблицы и первичные ключи
<?php namespace Application\Users; class Table extends \Bluz\Db\Table { /** * @var Table */ static $_instance; /** * Table * * @var string */ protected $_table = 'users'; /** * Primary key(s) * @var array */ protected $_primary = array('id'); }
По умолчанию, запрос к БД для вытаскивания сущностей имеет следующий вид:
SELECT * FROM $this->_table
Его можно изменить переопределив _select:
<?php protected $_select = " select users.* , g.name AS __groups_name from users left join groups g on users.group_id = g.id ";
There was an error while loading. Please reload this page.
Acl Application Auth Cache Common — Exception — Collection — Container — Helper — Options — Singleton Config Controller — Data — Mapper —— Crud —— Rest — Reflection Crud — Crud Table Db — Row — Table — Relations — Query Debug EventManager Grid Http Layout Logger Mailer Messages Nil Proxy Registry Request Response Router Session Translator Validator View