cycle / docs

Cycle ORM Documentation
https://cycle-orm.dev/docs
110 stars 38 forks source link

Customization typecasting example code typo #124

Closed jorge-ruukfy closed 2 years ago

jorge-ruukfy commented 2 years ago

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?

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;
}
roxblnfk commented 2 years ago

Thank you. Yes it should be UuidInterface. Would you like to create PR?