Exemplo n.º 1
0
 function getIndexFieldType($fieldName)
 {
     $field = $this->fields[$fieldName];
     if (!$field) {
         throw org_glizy_dataAccessDoctrine_ActiveRecordException::undefinedField($this->_className, $fieldName);
     }
     if ($field->index & $field::FULLTEXT) {
         return 'fulltext';
     } else {
         $type = $this->fields[$fieldName]->type;
         if ($type == org_glizy_dataAccessDoctrine_types_Types::ARRAY_ID) {
             return self::$typeMap[$this->fields[$fieldName]->option[org_glizy_dataAccessDoctrine_types_Types::ARRAY_ID]['type']];
         }
         return self::$typeMap[$type];
     }
 }
Exemplo n.º 2
0
 public function getDetailId()
 {
     if (is_null($this->detailPrimaryKeyName)) {
         throw org_glizy_dataAccessDoctrine_ActiveRecordException::detailPrimaryKeyNotDefined($this->tableName);
     }
     $detailPrimaryKeyName = $this->detailPrimaryKeyName;
     return $this->{$detailPrimaryKeyName};
 }
Exemplo n.º 3
0
 public function getId()
 {
     if (is_null($this->primaryKeyName)) {
         throw org_glizy_dataAccessDoctrine_ActiveRecordException::primaryKeyNotDefined($this->tableName);
     }
     $primarykey = $this->primaryKeyName;
     return $this->{$primarykey};
 }