Example #1
0
 public static function &connection()
 {
     if (static::$connection) {
         return static::$connection;
     }
     return parent::connection();
 }
Example #2
0
 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;
 }
Example #3
0
 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;
 }