Skip to content

Can't use UUID as primary key in fixtures #1151

Open
@Kingmidas74

Description

@Kingmidas74

Hi!

I have next fixture:

- model: User rows: - _id: user email: bob@example.com created_at: '{{ now }}' updated_at: '{{ now }}'

and id for my User model is UUID.

When I try to apply fixture, I get an error
ERROR: invalid input syntax for type uuid: "\x00000000000000000000000000000000" (SQLSTATE=22P02)

So, is it possible to use UUID as primary key and fixtures together? Probably I can add custom func to transform smth like {{uuid}} etc.. but I want to keep the option about foreign keys too.. (like {{user.id}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions