Add missing files from last comming and newly required one after rebase
This commit is contained in:
parent
9d1402e4a5
commit
a8787be0bf
31
lib/Doctrine/ORM/Mapping/CustomIdGenerator.php
Normal file
31
lib/Doctrine/ORM/Mapping/CustomIdGenerator.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\ORM\Mapping;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
* @Target("PROPERTY")
|
||||
*/
|
||||
final class CustomIdGenerator implements Annotation {
|
||||
/** @var string */
|
||||
public $class;
|
||||
/** @var array */
|
||||
public $args;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||
|
||||
/* @var $metadata ClassMetadataInfo */
|
||||
$metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE);
|
||||
$metadata->setDiscriminatorColumn(array(
|
||||
'name' => 'dtype',
|
||||
'type' => 'string',
|
||||
'length' => 255,
|
||||
'fieldName' => 'dtype',
|
||||
));
|
||||
$metadata->setDiscriminatorMap(array(
|
||||
'cat' => 'Doctrine\\Tests\\ORM\\Mapping\\Cat',
|
||||
'dog' => 'Doctrine\\Tests\\ORM\\Mapping\\Dog',
|
||||
));
|
||||
$metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
|
||||
$metadata->mapField(array(
|
||||
'fieldName' => 'id',
|
||||
'type' => 'string',
|
||||
'length' => NULL,
|
||||
'precision' => 0,
|
||||
'scale' => 0,
|
||||
'nullable' => false,
|
||||
'unique' => false,
|
||||
'id' => true,
|
||||
'columnName' => 'id',
|
||||
));
|
||||
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_CUSTOM);
|
||||
$metadata->setCustomGeneratorDefinition(array("class" => "stdClass", "args" => array("par1", "par2")));
|
Loading…
x
Reference in New Issue
Block a user