You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I instead use string as datatype of property, INSERT fails cos uuid_generate_v4 function is wrapped in quotes in resulting SQL.
Problem with DibiLiteral annotation is when accessing $entity->uuid. Since property is annotated as DibiLiteral and DB in fact returns string, LeanMapper throws exeption. So I tried to use this form for annotation
@property string|DibiLiteral $uuid
This crashed EntityReflection at this exact point cos regex didn't matches anything.
Can you suggest any idea how to solve this. I don't want to give up on using Postgre's UUIDs.
The text was updated successfully, but these errors were encountered:
I'd to define custom data types. This is a perfect use case. I started usingi sql server that has similar data types that do not have any corresponding ones in most of DBs (like GUID). And not just that. Decimal or kind of structed types might be defined this way in the future. But I move this issue to a lates release.
I use PostgreSQL and UUID datatype.
To generate proper UUID you need to set annotation to
so resulting SQL looks like this:
If I instead use
string
as datatype of property, INSERT fails cosuuid_generate_v4
function is wrapped in quotes in resulting SQL.Problem with
DibiLiteral
annotation is when accessing$entity->uuid
. Since property is annotated as DibiLiteral and DB in fact returns string, LeanMapper throws exeption. So I tried to use this form for annotationThis crashed EntityReflection at this exact point cos regex didn't matches anything.
Can you suggest any idea how to solve this. I don't want to give up on using Postgre's UUIDs.
The text was updated successfully, but these errors were encountered: