typeorm-encrypted icon indicating copy to clipboard operation
typeorm-encrypted copied to clipboard

typeorm encryption nopt working in case of unique true column

Open Akaim07 opened this issue 1 year ago • 3 comments

@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

Akaim07 avatar Feb 18 '24 13:02 Akaim07