Corrected method names; the interface already used SQL, the files still used Sql in method names
This commit is contained in:
parent
8d52967fcd
commit
20c6259fa3
@ -36,7 +36,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
protected function _getDeleteRowSql(PersistentCollection $coll)
|
||||
protected function _getDeleteRowSQL(PersistentCollection $coll)
|
||||
{
|
||||
$mapping = $coll->getMapping();
|
||||
$joinTable = $mapping->joinTable;
|
||||
@ -51,7 +51,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
* @internal Order of the parameters must be the same as the order of the columns in
|
||||
* _getDeleteRowSql.
|
||||
*/
|
||||
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element)
|
||||
protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
|
||||
{
|
||||
return $this->_collectJoinTableColumnParameters($coll, $element);
|
||||
}
|
||||
@ -61,7 +61,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
protected function _getUpdateRowSql(PersistentCollection $coll)
|
||||
protected function _getUpdateRowSQL(PersistentCollection $coll)
|
||||
{}
|
||||
|
||||
/**
|
||||
@ -71,7 +71,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
* @internal Order of the parameters must be the same as the order of the columns in
|
||||
* _getInsertRowSql.
|
||||
*/
|
||||
protected function _getInsertRowSql(PersistentCollection $coll)
|
||||
protected function _getInsertRowSQL(PersistentCollection $coll)
|
||||
{
|
||||
$mapping = $coll->getMapping();
|
||||
$joinTable = $mapping->joinTable;
|
||||
@ -87,11 +87,11 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
* @internal Order of the parameters must be the same as the order of the columns in
|
||||
* _getInsertRowSql.
|
||||
*/
|
||||
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element)
|
||||
protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
|
||||
{
|
||||
return $this->_collectJoinTableColumnParameters($coll, $element);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Collects the parameters for inserting/deleting on the join table in the order
|
||||
* of the join table columns as specified in ManyToManyMapping#joinTableColumns.
|
||||
@ -105,15 +105,15 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
$params = array();
|
||||
$mapping = $coll->getMapping();
|
||||
$isComposite = count($mapping->joinTableColumns) > 2;
|
||||
|
||||
|
||||
$identifier1 = $this->_uow->getEntityIdentifier($coll->getOwner());
|
||||
$identifier2 = $this->_uow->getEntityIdentifier($element);
|
||||
|
||||
|
||||
if ($isComposite) {
|
||||
$class1 = $this->_em->getClassMetadata(get_class($coll->getOwner()));
|
||||
$class2 = $coll->getTypeClass();
|
||||
}
|
||||
|
||||
|
||||
foreach ($mapping->joinTableColumns as $joinTableColumn) {
|
||||
if (isset($mapping->relationToSourceKeyColumns[$joinTableColumn])) {
|
||||
if ($isComposite) {
|
||||
@ -138,7 +138,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
protected function _getDeleteSql(PersistentCollection $coll)
|
||||
protected function _getDeleteSQL(PersistentCollection $coll)
|
||||
{
|
||||
$mapping = $coll->getMapping();
|
||||
$joinTable = $mapping->joinTable;
|
||||
@ -157,7 +157,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
* @internal Order of the parameters must be the same as the order of the columns in
|
||||
* _getDeleteSql.
|
||||
*/
|
||||
protected function _getDeleteSqlParameters(PersistentCollection $coll)
|
||||
protected function _getDeleteSQLParameters(PersistentCollection $coll)
|
||||
{
|
||||
$params = array();
|
||||
$mapping = $coll->getMapping();
|
||||
@ -170,7 +170,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
||||
} else {
|
||||
$params[] = array_pop($identifier);
|
||||
}
|
||||
|
||||
|
||||
return $params;
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ use Doctrine\ORM\PersistentCollection;
|
||||
|
||||
/**
|
||||
* Persister for one-to-many collections.
|
||||
*
|
||||
*
|
||||
* IMPORTANT:
|
||||
* This persister is only used for uni-directional one-to-many mappings on a foreign key
|
||||
* (which are not yet supported). So currently this persister is not used.
|
||||
@ -44,7 +44,7 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
* @return string
|
||||
* @override
|
||||
*/
|
||||
protected function _getDeleteRowSql(PersistentCollection $coll)
|
||||
protected function _getDeleteRowSQL(PersistentCollection $coll)
|
||||
{
|
||||
$mapping = $coll->getMapping();
|
||||
$targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName());
|
||||
@ -67,36 +67,36 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
return array("UPDATE $table SET $setClause WHERE $whereClause", $this->_uow->getEntityIdentifier($element));
|
||||
}
|
||||
|
||||
protected function _getInsertRowSql(PersistentCollection $coll)
|
||||
protected function _getInsertRowSQL(PersistentCollection $coll)
|
||||
{
|
||||
return "UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz";
|
||||
}
|
||||
|
||||
/* Not used for OneToManyPersister */
|
||||
protected function _getUpdateRowSql(PersistentCollection $coll)
|
||||
protected function _getUpdateRowSQL(PersistentCollection $coll)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates the SQL UPDATE that updates all the foreign keys to null.
|
||||
*
|
||||
* @param PersistentCollection $coll
|
||||
*/
|
||||
protected function _getDeleteSql(PersistentCollection $coll)
|
||||
protected function _getDeleteSQL(PersistentCollection $coll)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the SQL parameters for the corresponding SQL statement to delete
|
||||
* the given collection.
|
||||
*
|
||||
* @param PersistentCollection $coll
|
||||
*/
|
||||
protected function _getDeleteSqlParameters(PersistentCollection $coll)
|
||||
protected function _getDeleteSQLParameters(PersistentCollection $coll)
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the SQL parameters for the corresponding SQL statement to insert the given
|
||||
* element of the given collection into the database.
|
||||
@ -104,9 +104,9 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
* @param PersistentCollection $coll
|
||||
* @param mixed $element
|
||||
*/
|
||||
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element)
|
||||
protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the SQL parameters for the corresponding SQL statement to delete the given
|
||||
* element from the given collection.
|
||||
@ -114,6 +114,6 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
* @param PersistentCollection $coll
|
||||
* @param mixed $element
|
||||
*/
|
||||
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element)
|
||||
protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
|
||||
{}
|
||||
}
|
Loading…
Reference in New Issue
Block a user