public function __get($propertyName)
 {
     switch ($propertyName) {
         case 'parentID':
             return $this->FKValue[0];
         case 'selFromDbAllQuery':
             //$code='$fList='.$this->itemClass.'::getFieldsNameList();';
             //eval($code);
             //'.$fList.'
             $strQuery = 'SELECT * FROM `' . static::$tableName . '` WHERE 1 ' . ($this->FKValue[1] !== null ? ' AND ' . $this->FKName[1] . '=' . $this->FKValue[1] : '') . ($this->FKValue[0] !== null ? ' AND ' . $this->FKName[0] . ($this->FKValue[0] === 'NULL' ? ' IS ' : '=') . $this->FKValue[0] : '');
             $strQuery = $this->rebuildQueryForCustomLoad($strQuery);
             if ($strQuery === false) {
                 Error::__raiseError(401, $this->error_number, $this->error_message, $propertyName, __METHOD__, __LINE__);
             }
             return $strQuery;
         case 'delFromDbAllQuery':
             return 'DELETE FROM `' . static::$tableName . '` WHERE ' . $this->FKName[0] . '=' . $this->FKValue[0];
         default:
             return parent::__get($propertyName);
     }
 }
 public function __get($propertyName)
 {
     switch ($propertyName) {
         case 'parentID':
             return $this->FKValue[0];
         case 'addToDbQuery':
             return 'INSERT INTO `' . $this->fkTableName . '` SET ' . $this->FKName[0] . '=' . $this->FKValue[0] . ', ' . $this->FKName[1] . '=' . $this->FKValue[1];
         case 'delFromDbQuery':
             return 'DELETE FROM `' . $this->fkTableName . '` WHERE ' . $this->FKName[0] . '=' . $this->FKValue[0] . ' AND ' . $this->FKName[1] . '=' . $this->FKValue[1];
         case 'selFromDbAllQuery':
             $strQuery = $this->FKValue[0] !== null ? 'SELECT o.* FROM `' . static::$tableName . '` o inner join `' . $this->fkTableName . '` f  on o.id=f.' . $this->FKName[1] . ' WHERE f.' . $this->FKName[0] . '=' . $this->FKValue[0] : 'SELECT o.* FROM `' . static::$tableName . '` o WHERE 1';
             $strQuery = $this->rebuildQueryForCustomLoad($strQuery);
             if ($strQuery === false) {
                 Error::__raiseError(401, $propertyName, __METHOD__, __LINE__);
             }
             return $strQuery;
         case 'delFromDbAllQuery':
             return 'DELETE FROM `' . $this->fkTableName . '` WHERE ' . $this->FKName[0] . '=' . $this->FKValue[0];
         default:
             parent::__get($propertyName);
     }
 }