loopbackio/loopback-connector-postgresql

Postgres JSON type and regexp losing parameter

Closed this issue · 2 comments

Steps to reproduce

via Loopback explorer run a query on a json column with the following filter

{"where":{"attributes.tag_line":{"regexp":"hello"}}}

Current Behavior

No rows returned. Debug shows that parameters are Null, if we use ILIKE, Parameter is correct

loopback:datasource Datasource db: connected=true connecting=true +36s
loopback:juggler:utils Sanitizing query object: {"where":{"attributes.tag_line":{"regexp":"hello"}}} +36s
loopback:connector:postgresql SQL: SELECT XXXX FROM "XXXX"."items" WHERE "attributes"->>'tag_line' ~ $1 ORDER BY "item_id"
loopback:connector:postgresql Parameters: [null] +36s

Expected Behavior

parameter should be filled and query should return data

Link to reproduction sandbox

Additional information

Related Issues

See Reporting Issues for more tips on writing good issues

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.