public static function &connection() { if (static::$connection) { return static::$connection; } return parent::connection(); }
public static function schema($field = null) { $result = parent::schema($field); if (is_object($result) && get_class($result) === 'lithium\\data\\Schema') { return new Schema(array('fields' => $result->fields(), 'meta' => $result->meta())); } return $result; }
public static function schema($field = null) { $schema = parent::schema(); $schema->append(array('_id' => array('type' => 'id'), 'foo' => array('type' => 'object'), 'foo.bar' => array('type' => 'int'))); return $schema; }