Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
20c6259f
Commit
20c6259f
authored
May 05, 2010
by
Christian Heinrich
Committed by
Roman S. Borschel
May 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected method names; the interface already used SQL, the files still used Sql in method names
parent
8d52967f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
25 deletions
+25
-25
ManyToManyPersister.php
lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
+12
-12
OneToManyPersister.php
lib/Doctrine/ORM/Persisters/OneToManyPersister.php
+13
-13
No files found.
lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
View file @
20c6259f
...
...
@@ -36,7 +36,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
*
* @override
*/
protected
function
_getDeleteRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getDeleteRowS
QL
(
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
_getDeleteRowS
ql
Parameters
(
PersistentCollection
$coll
,
$element
)
protected
function
_getDeleteRowS
QL
Parameters
(
PersistentCollection
$coll
,
$element
)
{
return
$this
->
_collectJoinTableColumnParameters
(
$coll
,
$element
);
}
...
...
@@ -61,7 +61,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
*
* @override
*/
protected
function
_getUpdateRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getUpdateRowS
QL
(
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
_getInsertRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getInsertRowS
QL
(
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
_getInsertRowS
ql
Parameters
(
PersistentCollection
$coll
,
$element
)
protected
function
_getInsertRowS
QL
Parameters
(
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
_getDeleteS
ql
(
PersistentCollection
$coll
)
protected
function
_getDeleteS
QL
(
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
_getDeleteS
ql
Parameters
(
PersistentCollection
$coll
)
protected
function
_getDeleteS
QL
Parameters
(
PersistentCollection
$coll
)
{
$params
=
array
();
$mapping
=
$coll
->
getMapping
();
...
...
@@ -170,7 +170,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
}
else
{
$params
[]
=
array_pop
(
$identifier
);
}
return
$params
;
}
}
\ No newline at end of file
lib/Doctrine/ORM/Persisters/OneToManyPersister.php
View file @
20c6259f
...
...
@@ -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
_getDeleteRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getDeleteRowS
QL
(
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
_getInsertRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getInsertRowS
QL
(
PersistentCollection
$coll
)
{
return
"UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz"
;
}
/* Not used for OneToManyPersister */
protected
function
_getUpdateRowS
ql
(
PersistentCollection
$coll
)
protected
function
_getUpdateRowS
QL
(
PersistentCollection
$coll
)
{
return
;
}
/**
* Generates the SQL UPDATE that updates all the foreign keys to null.
*
* @param PersistentCollection $coll
*/
protected
function
_getDeleteS
ql
(
PersistentCollection
$coll
)
protected
function
_getDeleteS
QL
(
PersistentCollection
$coll
)
{
}
/**
* Gets the SQL parameters for the corresponding SQL statement to delete
* the given collection.
*
* @param PersistentCollection $coll
*/
protected
function
_getDeleteS
ql
Parameters
(
PersistentCollection
$coll
)
protected
function
_getDeleteS
QL
Parameters
(
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
_getInsertRowS
ql
Parameters
(
PersistentCollection
$coll
,
$element
)
protected
function
_getInsertRowS
QL
Parameters
(
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
_getDeleteRowS
ql
Parameters
(
PersistentCollection
$coll
,
$element
)
protected
function
_getDeleteRowS
QL
Parameters
(
PersistentCollection
$coll
,
$element
)
{}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment