- Added a new @PrimaryKey annotation to replace the too-specific property-wise @Id
This commit is contained in:
1 parent
0e8443b1c1
commit
b20e537038
6 files changed
+33
-19
No files matched your search
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Annotation\Property\Field;
|
||||
|
||||
class PrimaryKey extends \Ulmus\Annotation\Property\Field {
|
||||
|
||||
public function __construct(? string $type = null, ? int $length = null)
|
||||
{
|
||||
$this->nullable = false;
|
||||
$this->attributes['primary_key'] = true;
|
||||
|
||||
parent::__construct($type, $length);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user