Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilterOperator.CONTAINS is BUG in postgresql ? #936

Open
KhoiBec opened this issue Jun 18, 2024 · 2 comments
Open

FilterOperator.CONTAINS is BUG in postgresql ? #936

KhoiBec opened this issue Jun 18, 2024 · 2 comments

Comments

@KhoiBec
Copy link

KhoiBec commented Jun 18, 2024

sorry about my english
my entity column
@Column({ type: 'enum', enum: RoleType, default: [RoleType.USER], array: true, }) roles!: RoleType[];

if (isArray && condition.parameters?.length && !['not', 'isNull'].includes(condition.operator)) { condition.parameters[0] =cardinality(${condition.parameters[0]}) }

cardinality returns the total number of elements in the array so filter contains will not work ?

@Helveg
Copy link
Collaborator

Helveg commented Jun 18, 2024

Hi! Thanks for reporting this issue! Could you show us with a full code example what the problem is? How are you using nestjs-paginate, what output or error do you get, and what output did you expect?

@ppetzold
Copy link
Owner

ideally submit a test case as PR pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants