typeorm-linq-repository
typeorm-linq-repository copied to clipboard
LOWER called on an enum value resulting in a pg error
In the following query if I don't specify {matchCase: true} the lib tries to call LOWER() on the enum and pg throws an error. The enum is defined as follows:
issueRepo.getAll()
.where(i => i.status)
.equal(IssueStatus.Pending, {matchCase: true});
export enum IssueStatus{
Pending = 'pending',
Closed = 'closed',
...
}
And the property in the entity definition is decorated like that:
@Column({ type: 'enum', enum: IssueStatus})
This is a follow up of #85
BTW, it will be nice to have a setting that specifies if LOWER is called on strings in the first place. In all of my usecases calling LOWER is not needed.