Compare commits

..

8 Commits

Author SHA1 Message Date
Benjamin Eberlei 7def30f283 Update dependencies to Common 2.0 stable and DBAL 2.0 stable. 2010-12-21 22:39:26 +01:00
Benjamin Eberlei 22ffbe7488 Fix tests so that PostgreSQL does not fail anymore on certain test. 2010-12-21 22:33:23 +01:00
Benjamin Eberlei 988d229c07 Fix XSD Schema 2010-12-21 22:04:13 +01:00
Benjamin Eberlei 43c63765db Extend phing build.xml for upcoming release. 2010-12-20 23:34:28 +01:00
Benjamin Eberlei c03fc00f45 DDC-936 - Fix target-entity and repository-class to be string rather than xs:NMTOKEN because of the class backslash. 2010-12-15 22:01:16 +01:00
Benjamin Eberlei 6ddfd06efe Merge branch 'DDC-933' 2010-12-14 23:26:50 +01:00
Benjamin Eberlei d87391e40c DDC-933 - Fix bug in lock sql generation of CTI classes. 2010-12-14 23:26:40 +01:00
Benjamin Eberlei 2648c1a6ca Fix build.xml to generate proper package.xml for Windows PEAR Package. 2010-12-14 23:10:45 +01:00
7 changed files with 67 additions and 11 deletions
+5
View File
@@ -83,6 +83,7 @@
Builds ORM package, preparing it for distribution.
-->
<target name="build-orm" depends="prepare">
<exec command="grep '${version}' ${project.basedir}/lib/Doctrine/ORM/Version.php" checkreturn="true"/>
<copy todir="${build.dir}/doctrine-orm">
<fileset refid="shared-artifacts"/>
</copy>
@@ -168,6 +169,8 @@
<install as="doctrine.php" name="bin/doctrine.php" />
<install as="doctrine.bat" name="bin/doctrine.bat" />
</release>
<replacement path="bin/doctrine.bat" type="pear-config" from="@php_bin@" to="php_bin" />
<replacement path="bin/doctrine.bat" type="pear-config" from="@bin_dir@" to="bin_dir" />
</d51pearpkg2>
<exec command="pear package" dir="${build.dir}/doctrine-orm" passthru="true" />
<exec command="mv DoctrineORM-${version}.tgz ../../dist" dir="${build.dir}/doctrine-orm" passthru="true" />
@@ -181,6 +184,7 @@
</target>
<target name="git-tag">
<exec command="grep '${version}' ${project.basedir}/lib/Doctrine/ORM/Version.php" checkreturn="true"/>
<exec command="git tag -a ${version}" passthru="true" />
<exec command="git push origin ${version}" passthru="true" />
</target>
@@ -195,6 +199,7 @@
</target>
<target name="update-dev-version">
<exec command="grep '${version}' ${project.basedir}/lib/Doctrine/ORM/Version.php" checkreturn="true"/>
<propertyprompt propertyName="next_version" defaultValue="${version}" promptText="Enter next version string (without -DEV)" />
<exec command="sed 's/${version}-DEV/${next_version}-DEV/' ${project.basedir}/lib/Doctrine/ORM/Version.php > ${project.basedir}/lib/Doctrine/ORM/Version2.php" passthru="true" />
<exec command="mv ${project.basedir}/lib/Doctrine/ORM/Version2.php ${project.basedir}/lib/Doctrine/ORM/Version.php" passthru="true" />
+6 -6
View File
@@ -73,7 +73,7 @@
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="table" type="xs:NMTOKEN" />
<xs:attribute name="schema" type="xs:NMTOKEN" />
<xs:attribute name="repository-class" type="xs:NMTOKEN"/>
<xs:attribute name="repository-class" type="xs:string"/>
<xs:attribute name="inheritance-type" type="orm:inheritance-type"/>
<xs:attribute name="change-tracking-policy" type="orm:change-tracking-policy" />
</xs:complexType>
@@ -252,7 +252,7 @@
<xs:element name="join-table" type="orm:join-table" minOccurs="0" />
<xs:element name="order-by" type="orm:order-by" minOccurs="0" />
</xs:sequence>
<xs:attribute name="target-entity" type="xs:NMTOKEN" use="required" />
<xs:attribute name="target-entity" type="xs:string" use="required" />
<xs:attribute name="field" type="xs:NMTOKEN" use="required" />
<xs:attribute name="mapped-by" type="xs:NMTOKEN" />
<xs:attribute name="inversed-by" type="xs:NMTOKEN" />
@@ -264,7 +264,7 @@
<xs:element name="cascade" type="orm:cascade-type" minOccurs="0" />
<xs:element name="order-by" type="orm:order-by" minOccurs="0" />
</xs:sequence>
<xs:attribute name="target-entity" type="xs:NMTOKEN" use="required" />
<xs:attribute name="target-entity" type="xs:string" use="required" />
<xs:attribute name="mapped-by" type="xs:NMTOKEN" use="required" />
<xs:attribute name="field" type="xs:NMTOKEN" use="required" />
<xs:attribute name="orphan-removal" type="xs:boolean" default="false" />
@@ -279,7 +279,7 @@
<xs:element name="join-columns" type="orm:join-columns"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="target-entity" type="xs:NMTOKEN" use="required" />
<xs:attribute name="target-entity" type="xs:string" use="required" />
<xs:attribute name="field" type="xs:NMTOKEN" use="required" />
<xs:attribute name="orphan-removal" type="xs:boolean" default="false" />
<xs:attribute name="fetch" type="orm:fetch-type" default="LAZY" />
@@ -295,11 +295,11 @@
</xs:choice>
</xs:sequence>
<xs:attribute name="field" type="xs:NMTOKEN" use="required" />
<xs:attribute name="target-entity" type="xs:NMTOKEN" use="required" />
<xs:attribute name="target-entity" type="xs:string" use="required" />
<xs:attribute name="mapped-by" type="xs:NMTOKEN" />
<xs:attribute name="inversed-by" type="xs:NMTOKEN" />
<xs:attribute name="orphan-removal" type="xs:boolean" default="false" />
<xs:attribute name="fetch" type="orm:fetch-type" default="LAZY" />
</xs:complexType>
</xs:schema>
</xs:schema>
@@ -365,6 +365,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
*/
public function getLockTablesSql()
{
$idColumns = $this->_class->getIdentifierColumnNames();
$baseTableAlias = $this->_getSQLTableAlias($this->_class->name);
// INNER JOIN parent tables
@@ -8,9 +8,23 @@ require_once __DIR__ . '/../../../TestInit.php';
class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
protected $oldMetadata;
protected function setUp() {
$this->useModelSet('company');
parent::setUp();
$this->oldMetadata = $this->_em->getClassMetadata('Doctrine\Tests\Models\Company\CompanyEmployee');
$metadata = clone $this->oldMetadata;
ksort($metadata->reflFields);
$this->_em->getMetadataFactory()->setMetadataFor('Doctrine\Tests\Models\Company\CompanyEmployee', $metadata);
}
public function tearDown()
{
$this->_em->getMetadataFactory()->setMetadataFor('Doctrine\Tests\Models\Company\CompanyEmployee', $this->oldMetadata);
parent::tearDown();
}
/**
@@ -19,9 +33,6 @@ class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase
public function testJoinedSubclassPersisterRequiresSpecificOrderOfMetadataReflFieldsArray()
{
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
$metadata = $this->_em->getClassMetadata('Doctrine\Tests\Models\Company\CompanyEmployee');
ksort($metadata->reflFields);
$spouse = new CompanyEmployee;
$spouse->setName("Blub");
@@ -0,0 +1,39 @@
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Tests\Models\CMS\CmsUser;
use Doctrine\Tests\Models\CMS\CmsGroup;
require_once __DIR__ . '/../../../TestInit.php';
class DDC933Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
public function setUp()
{
$this->useModelSet('company');
parent::setUp();
}
/**
* @group DDC-933
*/
public function testLockCTIClass()
{
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
$manager = new \Doctrine\Tests\Models\Company\CompanyManager();
$manager->setName('beberlei');
$manager->setSalary(1234);
$manager->setTitle('Vice Precident of This Test');
$manager->setDepartment("Foo");
$this->_em->persist($manager);
$this->_em->flush();
$this->_em->beginTransaction();
$this->_em->lock($manager, \Doctrine\DBAL\LockMode::PESSIMISTIC_READ);
$this->_em->rollback();
}
}