As I understand the bottom example should be UUID instead string, as is the main objective of typecasting, isn't it?
use Cycle\Annotated\Annotation\Entity;
+ use Whatever\Uuid;
#[Entity(
typecast: [
\Cycle\ORM\Parser\Typecast::class,
App\UuidTypecast::class,
'carbon_typecast'
]
)]
class User
{
#[Cycle\Column(type: 'string', typecast: 'uuid')]
+ public Uuid $uuid;
- public string $uuid;
}
https://cycle-orm.dev/docs/advanced-typecasting/2.x/en
As I understand the bottom example should be UUID instead string, as is the main objective of typecasting, isn't it?