Closed ColeoptereMoroseDeVan closed 8 months ago
Hi,
Requirements
- "nestjs-typeorm-paginate": "^4.0.1"
- "typeorm": "^0.3.6"
Wanted
I want to filter my response data by a search param, like the example of the doc about cat and their lives. (I want to receive only cats that have 9 lives)
So, I tryed the example :
return paginate<CatEntity>(this.repository, options, { lives: 9, });
However, I don't get the expected value, I received all cats, no matter how much lives they have.
Researched
So I read the code and paginateRepository function add my value correctly, however the filters is not used.
After I checked the repository service I figured out that there is now two options handle by typeorm repository : find and findBy. Find accept { take, skip } FindBy accept { ...entityParams }
So my params can't be filter.
Question
Did I did something wrong, or is this a bug ? Should I use only queryBuilder to add my filters property ?
Thank's for your time and for this amazing module 👍
Is there any update on this issue!!?
{where: {live: 9}}
{ where: {email: Like(%${variable}%
) } }
not working with Like?
Hi,
Requirements
Wanted
I want to filter my response data by a search param, like the example of the doc about cat and their lives. (I want to receive only cats that have 9 lives)
So, I tryed the example :
However, I don't get the expected value, I received all cats, no matter how much lives they have.
Researched
So I read the code and paginateRepository function add my value correctly, however the filters is not used.
After I checked the repository service I figured out that there is now two options handle by typeorm repository : find and findBy. Find accept { take, skip } FindBy accept { ...entityParams }
So my params can't be filter.
Question
Did I did something wrong, or is this a bug ? Should I use only queryBuilder to add my filters property ?
Thank's for your time and for this amazing module 👍