#Query error using local API in Payload v3.77.0

8 messages · Page 1 of 1 (latest)

wicked thicket
#

Hi, I updated to payload 3.77.0 from 3.74.0 and started getting this error:

Error: Failed query: select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_roles" on "users"."id" = "users_roles"."parent_id" where ("users_roles"."value" = $1 and "users_roles"."value" ilike $2) order by "users"."created_at" desc limit $3
params: seller,%seller%,10
at async Profiles (src\blocks\Profiles\component.tsx:15:22)
13 | const payload = await getPayload({ config: configPromise })
14 |

15 | const profiles = await payload.find({
| ^
16 | collection: 'users',
17 | depth: 1,
18 | limit: maxProfiles, {
query: 'select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_roles" on "users"."id" = "users_roles"."parent_id" where ("users_roles"."value" = $1 and "users_roles"."value" ilike $2) order by "users"."created_at" desc limit $3',
params: [Array],
digest: '30144703',
[cause]: error: operator does not exist: enum_users_roles ~~* unknown
at async Profiles (src\blocks\Profiles\component.tsx:15:22)
13 | const payload = await getPayload({ config: configPromise })
14 |
15 | const profiles = await payload.find({
| ^
16 | collection: 'users',
17 | depth: 1,
18 | limit: maxProfiles, {
length: 214,
severity: 'ERROR',
code: '42883',
detail: undefined,
hint: 'No operator matches the given name and argument types. You might need to add explicit type casts.',
position: '215',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_oper.c',
line: '635',
routine: 'op_error'
}
}

Do anyone knows what could it be?

wicked thicket
#

Query error using local API in Payload v3.77.0

elder mortar
wicked thicket
#

I just upgraded to v3.79.0 and I am getting the same error:

Error: Failed query: select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_roles" on "users"."id" = "users_roles"."parent_id" where "users_roles"."value" ilike $1 order by "users"."created_at" desc limit $2
params: %seller%,10
at async Profiles (src\blocks\Profiles\component.tsx:15:22)
13 | const payload = await getPayload({ config: configPromise })
14 |

15 | const profiles = await payload.find({
| ^
16 | collection: 'users',
17 | depth: 1,
18 | limit: maxProfiles, {
query: 'select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_roles" on "users"."id" = "users_roles"."parent_id" where "users_roles"."value" ilike $1 order by "users"."created_at" desc limit $2',
params: [Array],
digest: '3546361151',
[cause]: error: operator does not exist: enum_users_roles ~~* unknown
at async Profiles (src\blocks\Profiles\component.tsx:15:22)
13 | const payload = await getPayload({ config: configPromise })
14 |
15 | const profiles = await payload.find({
| ^
16 | collection: 'users',
17 | depth: 1,
18 | limit: maxProfiles, {
length: 214,
severity: 'ERROR',
code: '42883',
detail: undefined,
hint: 'No operator matches the given name and argument types. You might need to add explicit type casts.',
position: '183',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_oper.c',
line: '635',
routine: 'op_error'
}

I saw that the pull request already has been merged to main. Is the new release with these fixes not out yet?

#

I guess it's because of that; v3.79.0 was released 5 days ago, while the merge was done 3 days ago. Do you know when the next release is scheduled?

celest mesa
#

@wicked thicket You can try the daily canary release which contains the merged items for next release. Latest as of now is 3.80.0-canary.5 should contain your fix.

wicked thicket
#

The issue was solved on 3.79.1