Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uuid type casts #145

Open
ArgentumToivo opened this issue Apr 19, 2022 · 1 comment
Open

Uuid type casts #145

ArgentumToivo opened this issue Apr 19, 2022 · 1 comment

Comments

@ArgentumToivo
Copy link

Package versions and database engine type (please complete the following information):

  • Database Engine: [postgres]
  • TypeORM Version: [e.g. 0.3.6]
  • Driver Version [e.g. 2.4.2]

Describe the bug
ERROR: operator does not exist: character varying = uuid

An error occurs if you generate a variable using the uuid library and use it in a query, in a field of type character varying. I think this is due to the fact that formatOptions is enabled in the settings. It casts character varying to uuid, but the field in the table is character varying

To Reproduce

@Entity()
class SomeClass {
            @Column()
            public value: string
}
-----------------------------------
const value = uuidv4()
this.repository.findOne({
            where: {
                value
            }
})
@varsha-teckchandani
Copy link

varsha-teckchandani commented Nov 30, 2022

Hello.
Were you every able to resolve this issue? Some had the same issue here and they downgraded it to 2.0.6. Is there any other way to go about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants