typeorm-aurora-data-api-driver icon indicating copy to clipboard operation
typeorm-aurora-data-api-driver copied to clipboard

Uuid type casts

Open ArgentumToivo opened this issue 2 years ago • 1 comments

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
            }
})

ArgentumToivo avatar Apr 19 '22 18:04 ArgentumToivo

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?

varsha-teckchandani avatar Nov 30 '22 15:11 varsha-teckchandani