Skip to content

Loading…

DDC-1885: Problem with column quoting on Delete #2549

Closed
doctrinebot opened this Issue · 9 comments

1 participant

@doctrinebot

Jira issue originally created by user ignaciolarranaga:

delete($entity) from BasicEntityPersiter is not considering that the columns might be quoted.

public function delete($entity) {
    $identifier = $this->_em->getUnitOfWork()->getEntityIdentifier($entity);
        $this->deleteJoinTableRecords($identifier);

        $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier);
        $this->*conn->delete($this->_class->getQuotedTableName($this->*platform), $id);
}

The third line:

        $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier);
        // might be fixed in this way (as example):
        foreach ($identifier as $columnName => $value) {
                $id[$this->*class->getQuotedColumnName($columnName, $this->*platform)] = $value;
        }
@doctrinebot

Comment created by @FabioBatSilva:

code format

@doctrinebot

Comment created by @FabioBatSilva:

Hi Ignacio,

I think it will be fixed by :
#372

Anyway could you attach a test case for this one please ?

@doctrinebot

Comment created by ignaciolarranaga:

Hi Fabio, sorry I doesn't have a test case written :(

@doctrinebot

Comment created by @FabioBatSilva:

Hi Ignacio,

No problem, could you attach your entities ?

Thanks

@doctrinebot

Comment created by ignaciolarranaga:

User and Role, and I was just adding a role and updateing.
The database is PostgresSQL.

@doctrinebot

Comment created by @FabioBatSilva:

Thanks Ignacio,

I'm working on this problem.

@doctrinebot

Comment created by @FabioBatSilva:

Fixed by : 4bfdcd3

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.3 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.