Op.contains - No operator matches the given name and argument types. You might need to add explicit type casts. #16351
Unanswered
gregghawes
asked this question in
Help & Questions
Replies: 1 comment
-
Which version of Sequelize are you using? What is the DataType of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Having an issue that I can't work out. If I query an included array field from the root where I recieve a "No operator matches the given name and argument types. You might need to add explicit type casts." error but the same query in the include works correctly.
Working code
Code resulting in an error:
Generated SQL
SELECT "Site"."id", "Site"."website", "Site"."domain", "Site"."subdomain", "Site"."sld", "Site"."tld", "Site"."createdAt", "Site"."updatedAt", "Site"."deletedAt", "prices"."id" AS "prices.id", "prices"."organisationId" AS "prices.organisationId", "prices"."siteId" AS "prices.siteId", "prices"."doFollow" AS "prices.doFollow", "prices"."exampleUrl" AS "prices.exampleUrl", "prices"."language" AS "prices.language", "prices"."currency" AS "prices.currency", "prices"."amount" AS "prices.amount", "prices"."accepts" AS "prices.accepts", "prices"."includesContent" AS "prices.includesContent", "prices"."createdById" AS "prices.createdById", "prices"."contractLengthId" AS "prices.contractLengthId", "prices"."minContentLength" AS "prices.minContentLength", "prices"."notes" AS "prices.notes", "prices"."createdAt" AS "prices.createdAt", "prices"."updatedAt" AS "prices.updatedAt", "prices"."deletedAt" AS "prices.deletedAt" FROM "Sites" AS "Site" LEFT OUTER JOIN "SitePrices" AS "prices" ON "Site"."id" = "prices"."siteId" AND ("prices"."deletedAt" IS NULL) WHERE ("Site"."deletedAt" IS NULL AND "prices"."accepts" @> ARRAY['Gambling']);
Beta Was this translation helpful? Give feedback.
All reactions