/**
  * {@inheritdoc}
  */
 protected function getLockTablesSql($lockMode)
 {
     $joinSql = '';
     $identifierColumns = $this->class->getIdentifierColumnNames();
     $baseTableAlias = $this->getSQLTableAlias($this->class->name);
     // INNER JOIN parent tables
     foreach ($this->class->parentClasses as $parentClassName) {
         $conditions = array();
         $tableAlias = $this->getSQLTableAlias($parentClassName);
         $parentClass = $this->em->getClassMetadata($parentClassName);
         $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON ';
         foreach ($identifierColumns as $idColumn) {
             $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
         }
         $joinSql .= implode(' AND ', $conditions);
     }
     return parent::getLockTablesSql($lockMode) . $joinSql;
 }