IdentifiableTrait
A trait which provides an `id` column for entities.
Table of Contents
Properties
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
Methods
- getId() : int|null
- Get the identifier of the object.
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
Properties
$id
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- #[GeneratedValue]
- $strategy: 'IDENTITY'
- #[Id]
Methods
getId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullsetId()
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
public
setId(int|null $id) : void
Parameters
- $id : int|null