Skip to content

typeorm encryption nopt working in case of unique true column #68

@Akaim07

Description

@Akaim07

@entity()
export class UserEntity extends BaseEntity {
@PrimaryGeneratedColumn()
id: number;
@column()
name: string;
@column()
age: string;
@column({
type: "varchar",
nullable: false,
unique: true,
transformer: new EncryptionTransformer({
key: 'e41c966f21f9e1577802463f8924e6a3fe3e9751f201304213b2f845d8841d61',
algorithm: 'aes-256-gcm',
ivLength: 16
})
})
email: string;
} in this case it always generate new cyper even if the email is same expected it need to throw error of duplicate please take a look at this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions