Files
ulmus/src/Annotation/Property/Field/ForeignKey.php
T

21 lines
522 B
PHP

<?php
namespace Ulmus\Annotation\Property\Field;
/**
* Since we need consistancy between the declaration of our ID and FK fields, it
* was decided to extend the Id class instead of Field for this case.
*/
class ForeignKey extends PrimaryKey {
public function __construct(? string $type = null, ? int $length = null)
{
parent::__construct($type, $length);
unset($this->nullable);
$this->attributes['primary_key'] = false;
$this->attributes['auto_increment'] = false;
}
}