adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

Filter doesn't work on TypeORM columns with transformers

Open mohamednazmi1 opened this issue 1 year ago • 0 comments

Describe the bug When I search an entity User by a field/column name that has a transformer, the filter returns no result at all. When I delete the transformer, the filter works!

A sample of my entity:

class User extends BaseEntity {
  @Column({
    unique: true,
    transformer: {
      from: (value) => value,
      to: (value) => value && String(value).trim(),
    },
  })
  name: string;
}

My packages:

mohamednazmi1 avatar Oct 04 '22 18:10 mohamednazmi1