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
9cee8bf8
Commit
9cee8bf8
authored
May 01, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'dc2master/master'
parents
f38584a5
94928c5d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
32 deletions
+42
-32
build.xml
build.xml
+7
-7
OCI8Statement.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
+1
-0
AssociationMapping.php
lib/Doctrine/ORM/Mapping/AssociationMapping.php
+2
-1
ClassMetadata.php
lib/Doctrine/ORM/Mapping/ClassMetadata.php
+1
-17
ClassMetadataInfo.php
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
+22
-0
AnnotationDriver.php
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
+1
-1
XmlDriver.php
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
+3
-3
PersistentCollection.php
lib/Doctrine/ORM/PersistentCollection.php
+1
-1
BasicEntityPersister.php
lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
+1
-1
XmlExporter.php
lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
+1
-1
ClassMetadataTest.php
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php
+2
-0
No files found.
build.xml
View file @
9cee8bf8
...
...
@@ -142,16 +142,16 @@
<nativephpunit
testfile=
"./tests/Doctrine/Tests/ORM/Performance/AllTests.php"
testdirectory=
"./tests"
haltonfailure=
"false"
haltonerror=
"false"
/>
<tstamp/>
<
svnlastrevision
svnpath=
"${svn.path}"
workingcopy=
"."
propertyname=
"svn.lastrevision"
/
>
<copy
file=
"${build.dir}/logs/testsuites.xml"
tofile=
"${log.archive.dir}/
${svn.lastrevision}
/log.xml"
overwrite=
"true"
/>
<
!--<svnlastrevision svnpath="${svn.path}" workingcopy="." propertyname="svn.lastrevision"/>--
>
<copy
file=
"${build.dir}/logs/testsuites.xml"
tofile=
"${log.archive.dir}/
latest
/log.xml"
overwrite=
"true"
/>
<if><equals
arg1=
"${test.pmd_reports}"
arg2=
"1"
/>
<then>
<exec
command=
"${test.pdepend_exec} --jdepend-xml=${build.dir}/logs/jdepend.xml ./lib/Doctrine"
/>
<exec
command=
"${test.phpmd_exec} ./lib/Doctrine xml codesize --reportfile ${build.dir}/logs/phpmd.xml"
/>
<copy
file=
"${build.dir}/logs/jdepend.xml"
tofile=
"${log.archive.dir}/
${svn.lastrevision}
/jdepend.xml"
overwrite=
"true"
/>
<copy
file=
"${build.dir}/logs/phpmd.xml"
tofile=
"${log.archive.dir}/
${svn.lastrevision}
/phpmd.xml"
overwrite=
"true"
/>
<copy
file=
"${build.dir}/logs/jdepend.xml"
tofile=
"${log.archive.dir}/
latest
/jdepend.xml"
overwrite=
"true"
/>
<copy
file=
"${build.dir}/logs/phpmd.xml"
tofile=
"${log.archive.dir}/
latest
/phpmd.xml"
overwrite=
"true"
/>
</then>
</if>
</target>
...
...
@@ -163,7 +163,7 @@
<d51pearpkg2
baseinstalldir=
"/"
dir=
"${build.dir}/common/DoctrineCommon-${version}"
>
<name>
DoctrineCommon
</name>
<summary>
Common Doctrine code
</summary>
<channel>
pear.
phpdoctrine
.org
</channel>
<channel>
pear.
doctrine-project
.org
</channel>
<description>
The Doctrine Common package contains shared code between the other packages.
</description>
<lead
user=
"jwage"
name=
"Jonathan H. Wage"
email=
"jonwage@gmail.com"
/>
<lead
user=
"guilhermeblanco"
name=
"Guilherme Blanco"
email=
"guilhermeblanco@gmail.com"
/>
...
...
@@ -182,7 +182,7 @@
<d51pearpkg2
baseinstalldir=
"/"
dir=
"${build.dir}/dbal/DoctrineDBAL-${version}"
>
<name>
DoctrineDBAL
</name>
<summary>
Doctrine Database Abstraction Layer
</summary>
<channel>
pear.
phpdoctrine
.org
</channel>
<channel>
pear.
doctrine-project
.org
</channel>
<description>
The Doctrine DBAL package is the database abstraction layer used to power the ORM package.
</description>
<lead
user=
"jwage"
name=
"Jonathan H. Wage"
email=
"jonwage@gmail.com"
/>
<lead
user=
"guilhermeblanco"
name=
"Guilherme Blanco"
email=
"guilhermeblanco@gmail.com"
/>
...
...
@@ -201,7 +201,7 @@
<d51pearpkg2
baseinstalldir=
"/"
dir=
"${build.dir}/orm/DoctrineORM-${version}"
>
<name>
DoctrineORM
</name>
<summary>
Doctrine Object Relationl Mapper
</summary>
<channel>
pear.
phpdoctrine
.org
</channel>
<channel>
pear.
doctrine-project
.org
</channel>
<description>
The Doctrine ORM package is the primary package containing the object relational mapper.
</description>
<lead
user=
"jwage"
name=
"Jonathan H. Wage"
email=
"jonwage@gmail.com"
/>
<lead
user=
"guilhermeblanco"
name=
"Guilherme Blanco"
email=
"guilhermeblanco@gmail.com"
/>
...
...
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
View file @
9cee8bf8
...
...
@@ -60,6 +60,7 @@ class OCI8Statement implements \Doctrine\DBAL\Driver\Statement
* placeholders and converted to a named parameter.
*
* @param string $statement The SQL statement to convert.
* @todo review and test for lost spaces. we experienced missing spaces with oci8 in some sql statements.
*/
private
function
_convertPositionalToNamedPlaceholders
(
$statement
)
{
...
...
lib/Doctrine/ORM/Mapping/AssociationMapping.php
View file @
9cee8bf8
...
...
@@ -356,7 +356,8 @@ abstract class AssociationMapping
$serialized
=
array
(
'sourceEntityName'
,
'targetEntityName'
,
'sourceFieldName'
'sourceFieldName'
,
'fetchMode'
);
if
(
$this
->
isCascadeDetach
)
{
...
...
lib/Doctrine/ORM/Mapping/ClassMetadata.php
View file @
9cee8bf8
...
...
@@ -41,13 +41,6 @@ use ReflectionClass, ReflectionProperty;
*/
class
ClassMetadata
extends
ClassMetadataInfo
{
/**
* The ReflectionClass instance of the mapped class.
*
* @var ReflectionClass
*/
public
$reflClass
;
/**
* The ReflectionProperty instances of the mapped class.
*
...
...
@@ -76,16 +69,6 @@ class ClassMetadata extends ClassMetadataInfo
$this
->
table
[
'name'
]
=
$this
->
reflClass
->
getShortName
();
}
/**
* Gets the ReflectionClass instance of the mapped class.
*
* @return ReflectionClass
*/
public
function
getReflectionClass
()
{
return
$this
->
reflClass
;
}
/**
* Gets the ReflectionPropertys of the mapped class.
*
...
...
@@ -286,6 +269,7 @@ class ClassMetadata extends ClassMetadataInfo
'identifier'
,
'isIdentifierComposite'
,
// TODO: REMOVE
'name'
,
'namespace'
,
// TODO: REMOVE
'table'
,
'rootEntityName'
,
'idGenerator'
,
//TODO: Does not really need to be serialized. Could be moved to runtime.
...
...
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
View file @
9cee8bf8
...
...
@@ -19,6 +19,8 @@
namespace
Doctrine\ORM\Mapping
;
use
ReflectionClass
;
/**
* A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata
* of an entity and it's associations.
...
...
@@ -366,6 +368,13 @@ class ClassMetadataInfo
*/
public
$versionField
;
/**
* The ReflectionClass instance of the mapped class.
*
* @var ReflectionClass
*/
public
$reflClass
;
/**
* Initializes a new ClassMetadata instance that will hold the object-relational mapping
* metadata of the class with the given name.
...
...
@@ -378,6 +387,19 @@ class ClassMetadataInfo
$this
->
rootEntityName
=
$entityName
;
}
/**
* Gets the ReflectionClass instance of the mapped class.
*
* @return ReflectionClass
*/
public
function
getReflectionClass
()
{
if
(
!
$this
->
reflClass
)
{
$this
->
reflClass
=
new
ReflectionClass
(
$entityName
);
}
return
$this
->
reflClass
;
}
/**
* Sets the change tracking policy used by this class.
*
...
...
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
View file @
9cee8bf8
...
...
@@ -143,7 +143,7 @@ class AnnotationDriver implements Driver
throw
MappingException
::
classIsNotAValidEntityOrMappedSuperClass
(
$className
);
}
// Evaluate
Doctrine
Table annotation
// Evaluate Table annotation
if
(
isset
(
$classAnnotations
[
'Doctrine\ORM\Mapping\Table'
]))
{
$tableAnnot
=
$classAnnotations
[
'Doctrine\ORM\Mapping\Table'
];
$primaryTable
=
array
(
...
...
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
View file @
9cee8bf8
...
...
@@ -205,9 +205,9 @@ class XmlDriver extends AbstractFileDriver
if
(
isset
(
$idElement
->
{
'sequence-generator'
}))
{
$seqGenerator
=
$idElement
->
{
'sequence-generator'
};
$metadata
->
setSequenceGeneratorDefinition
(
array
(
'sequenceName'
=>
$seqGenerator
->
{
'sequence-name'
}
,
'allocationSize'
=>
$seqGenerator
->
{
'allocation-size'
}
,
'initialValue'
=>
$seqGeneratorAnnot
->
{
'initial-value'
}
'sequenceName'
=>
(
string
)
$seqGenerator
[
'sequence-name'
]
,
'allocationSize'
=>
(
string
)
$seqGenerator
[
'allocation-size'
]
,
'initialValue'
=>
(
string
)
$seqGeneratorAnnot
[
'initial-value'
]
));
}
else
if
(
isset
(
$idElement
->
{
'table-generator'
}))
{
throw
MappingException
::
tableIdGeneratorNotImplemented
(
$className
);
...
...
lib/Doctrine/ORM/PersistentCollection.php
View file @
9cee8bf8
...
...
@@ -359,7 +359,7 @@ final class PersistentCollection implements Collection
$this
->
_em
->
getUnitOfWork
()
->
scheduleOrphanRemoval
(
$removed
);
}
}
return
$removed
;
}
...
...
lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
View file @
9cee8bf8
...
...
@@ -815,7 +815,7 @@ class BasicEntityPersister
:
$baseTableAlias
;
$columnName
=
$this
->
_class
->
getQuotedColumnName
(
$fieldName
,
$this
->
_platform
);
$orderBySql
.=
$orderBySql
?
', '
:
'ORDER BY '
;
$orderBySql
.=
$orderBySql
?
', '
:
'
ORDER BY '
;
$orderBySql
.=
$tableAlias
.
'.'
.
$columnName
.
' '
.
$orientation
;
}
...
...
lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
View file @
9cee8bf8
...
...
@@ -53,7 +53,7 @@ class XmlExporter extends AbstractExporter
$xml
->
addAttribute
(
'xmlns'
,
'http://doctrine-project.org/schemas/orm/doctrine-mapping'
);
$xml
->
addAttribute
(
'xmlns:xsi'
,
'http://www.w3.org/2001/XMLSchema-instance'
);
$xml
->
addAttribute
(
'xsi:schemaLocation'
,
'http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd'
);
$xml
->
addAttribute
(
'xsi:schemaLocation'
,
'http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping
.xsd'
);
if
(
$metadata
->
isMappedSuperclass
)
{
$root
=
$xml
->
addChild
(
'mapped-superclass'
);
...
...
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php
View file @
9cee8bf8
...
...
@@ -37,6 +37,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
// Check state
$this
->
assertTrue
(
count
(
$cm
->
getReflectionProperties
())
>
0
);
$this
->
assertEquals
(
'Doctrine\Tests\Models\CMS'
,
$cm
->
namespace
);
$this
->
assertTrue
(
$cm
->
reflClass
instanceof
\ReflectionClass
);
$this
->
assertEquals
(
'Doctrine\Tests\Models\CMS\CmsUser'
,
$cm
->
name
);
$this
->
assertEquals
(
'UserParent'
,
$cm
->
rootEntityName
);
...
...
@@ -47,6 +48,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$this
->
assertTrue
(
$cm
->
getAssociationMapping
(
'phonenumbers'
)
instanceof
\Doctrine\ORM\Mapping\OneToOneMapping
);
$this
->
assertEquals
(
1
,
count
(
$cm
->
associationMappings
));
$oneOneMapping
=
$cm
->
getAssociationMapping
(
'phonenumbers'
);
$this
->
assertTrue
(
$oneOneMapping
->
fetchMode
==
\Doctrine\ORM\Mapping\AssociationMapping
::
FETCH_LAZY
);
$this
->
assertEquals
(
'phonenumbers'
,
$oneOneMapping
->
sourceFieldName
);
$this
->
assertEquals
(
'Doctrine\Tests\Models\CMS\Bar'
,
$oneOneMapping
->
targetEntityName
);
}
...
...
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