protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid)
    {
        $query = <<<QUERY
            SELECT o.id
            FROM %s o
            INNER JOIN %s c ON c.id = o.class_id
            WHERE o.object_identifier = %s AND c.class_type = %s
QUERY;

        return sprintf(
            $query,
            $this->options['oid_table_name'],
            $this->options['class_table_name'],
            $this->connection->quote((string) $oid->getIdentifier()),
            $this->connection->quote((string) $oid->getType())
        );
    }
protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid)
    {
        $query = <<<QUERY
            SELECT o.id
            FROM %s o
            INNER JOIN %s c ON c.id = o.class_id
            WHERE o.object_identifier = %s AND c.class_type = %s
QUERY;

        return sprintf(
            $query,
            $this->options['oid_table_name'],
            $this->options['class_table_name'],
            $this->connection->quote((string) $oid->getIdentifier()),
            $this->connection->quote((string) $oid->getType())
        );
    }
protected function getSelectObjectIdentityIdSql ( ObjectIdentityInterface $ oid ) { $ query =  <<<QUERY
            SELECT o.id
            FROM %s o
            INNER JOIN %s c ON c.id = o.class_id
            WHERE o.object_identifier = %s AND c.class_type = %s
QUERY ; return sprintf ( $ query , $ this -> options [ 'oid_table_name' ] , $ this -> options [ 'class_table_name' ] , $ this -> connection -> quote ( ( string ) $ oid -> getIdentifier ( ) ) , $ this -> connection -> quote ( ( string ) $ oid -> getType ( ) ) ) ; }
Constructs the SQL for retrieving the primary key of the given object
identity.

@param ObjectIdentityInterface $oid

@return string
Constructs the SQL for retrieving the primary key of the given object identity .