Пример #1
0
 /**
  * Get the "primaryKey1 = 'primaryKey1Value' AND primaryKey2 = 'primaryKey2Value'" of the entity
  *
  * @return     string  The SQL segment string "primaryKey1 = 'value1' AND primaryKey2 = 'value2'"
  */
 private function getEntityPrimaryKeysWhereClause() : string
 {
     $columnsValue = array();
     foreach ($this->entity->getIdKeyValue() as $columnName => $columnValue) {
         $columnsValue[] = '`' . $columnName . '` = ' . $this->castValueForSQLInsertion($columnValue);
     }
     return implode($columnsValue, ' AND ');
 }