public function __construct($attributes = []) { parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'game_user_id', 'field', 'multiplier', 'round'], 'belongsTo' => ['game_user' => ['class' => 'GameUser', 'foreignKey' => 'game_user_id', 'referencedColumn' => 'id']]]); }
public function __construct($attributes = []) { parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'game_id', 'user_id', 'score' => 0, 'ordinal'], 'belongsTo' => ['user' => ['class' => 'User', 'foreignKey' => 'user_id', 'referencedColumn' => 'id'], 'game' => ['class' => 'Game', 'foreignKey' => 'game_id', 'referencedColumn' => 'id']], 'hasOne' => ['winner_game' => ['class' => 'Game', 'foreignKey' => 'winner_game_user_id']]]); }
public function __construct($attributes = array()) { parent::__construct(array('hasMany' => array('products' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category'), 'products_starting_with_b' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name LIKE 'b%'"), 'products_ending_with_b_or_y' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => function () { return WhereClause::create("products.name LIKE ? OR products.name LIKE ?", array('%b', '%y')); }), 'products_name_bob' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => array("products.name" => "bob")), 'products_ordered_by_name' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'order' => array("products.name ASC"))), 'hasOne' => array('product_named_billy' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name = 'billy'")), 'belongsTo' => array('parent' => array('class' => 'Test\\Category', 'foreignKey' => 'id_parent', 'referencedColumn' => 'id')), 'attributes' => $attributes, 'fields' => $this->_fields)); }
function __construct($attributes = array()) { parent::__construct(array('attributes' => $attributes, 'fields' => array('login', 'password'))); }
public function __construct($attributes = array()) { parent::__construct(array('table' => 'orders', 'sequence' => 'orders_id_order_seq', 'primaryKey' => 'id_order', 'attributes' => $attributes, 'fields' => $this->_fields)); }
public function __construct($attributes = array()) { parent::__construct(array('table' => 'products', 'attributes' => $attributes, 'fields' => array('description' => self::$defaultDescription, 'name' => function () { return ProductWithDefaults::$defaultName; }, 'id_category', 'id_manufacturer', 'sale'))); }
public function __construct($attributes = array()) { parent::__construct(array('table' => 'products', 'primaryKey' => 'id', 'fields' => array('name'), 'sequence' => '', 'attributes' => $attributes)); }
public function __construct($attributes = []) { parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'login', 'password'], 'hasMany' => ['game_users' => ['class' => 'GameUser', 'foreignKey' => 'user_id']]]); }
public function __construct($attributes = []) { parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'current_game_user_id', 'round' => 1, 'finished' => false, 'winner_game_user_id', 'type', 'started_at' => Clock::nowAsString()], 'belongsTo' => ['current_game_user' => ['class' => 'GameUser', 'foreignKey' => 'current_game_user_id', 'referencedColumn' => 'id'], 'winner_game_user' => ['class' => 'GameUser', 'foreignKey' => 'winner_game_user_id', 'referencedColumn' => 'id']], 'hasMany' => ['game_users' => ['class' => 'GameUser', 'foreignKey' => 'game_id', 'referencedColumn' => 'id']]]); }
public function __construct(array $params) { parent::__construct($params); }
public function __construct($attributes = array()) { parent::__construct(array('table' => 'products', 'primaryKey' => '', 'attributes' => $attributes, 'fields' => $this->_fields)); }
public function __construct($attributes = array()) { parent::__construct(array('table' => 'order_products', 'sequence' => '', 'primaryKey' => '', 'attributes' => $attributes, 'belongsTo' => array('product' => array('class' => 'Test\\Product', 'foreignKey' => 'id_product'), 'order' => array('class' => 'Test\\Order', 'foreignKey' => 'id_order')), 'fields' => $this->_fields)); }
public function __construct($attributes = array(), $beforeSaveCallback = null, $afterSaveCallback = null) { parent::__construct(array('beforeSave' => $beforeSaveCallback, 'afterSave' => $afterSaveCallback, 'table' => 'products', 'primaryKey' => 'id', 'attributes' => $attributes, 'fields' => array('name'))); }
public function __construct($attributes = []) { parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'name', 'params', 'created_at' => Clock::nowAsString()]]); }
public function __construct($attributes = array()) { parent::__construct(array('attributes' => $attributes, 'belongsTo' => array('manufacturer' => array('class' => 'Test\\Manufacturer', 'foreignKey' => 'id_manufacturer'), 'category' => array('class' => 'Test\\Category', 'foreignKey' => 'id_category'), 'categoryWithNameByDescription' => array('class' => 'Test\\Category', 'foreignKey' => 'description', 'referencedColumn' => 'name')), 'hasOne' => array('orderProduct' => array('class' => 'Test\\OrderProduct', 'foreignKey' => 'id_product')), 'fields' => $this->_fields)); }
public function __construct() { parent::__construct(array('fields' => array('name'))); }
public function __construct($attributes = array()) { parent::__construct(array('hasMany' => array('products' => array('class' => 'Test\\Product', 'foreignKey' => 'id_manufacturer')), 'attributes' => $attributes, 'fields' => $this->_fields)); }