We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Usually there's no problem executing queries with UUID params. In debugger, statement might look kinda this:
... FROM some_table WHERE some_table.id = '19508260-d913-11e8-9f8b-f2801f1b9fd1'::uuid ...
However, when doing subquery ...:
SomeTable.join(OtherTable, JoinType.INNER, SomeTable.id, OtherTable.otherId) .select {...} .withDistinct(true) .count()
...uuid is not properly escaped :
SELECT COUNT(*) FROM (SELECT DISTINCT ... ON ... WHERE some_table.some_id = d821af77-f698-4141-8f2b-79a14fba0b0f and ...)
..which results in exception:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "f2b" Position: 727
The text was updated successfully, but these errors were encountered:
Could you provide an exact query, because I can see a subquery part in one provided above?
Sorry, something went wrong.
Exact query is:
TableA.join(TableB, JoinType.INNER, TableA.id, TableB.refId) .select { (TableB.someUUIDField eq someUUIDVal) and (TableA.otherField less otherVal) } .withDistinct(true) .count()
object TableA ... { val id = uuid("id").primaryKey() ... } object TableB ... { val refId = uuid("ref_id").references(TableA.id /*, restrict cascade */) val someUUIDField = uuid("ref_to_table_c").references(TableC.id /*, restrict cascade */) ... }
#415 uuid values are not properly escaped in subquery
b048ddb
Tapac
No branches or pull requests
Usually there's no problem executing queries with UUID params. In debugger, statement might look kinda this:
However, when doing subquery ...:
...uuid is not properly escaped :
..which results in exception:
The text was updated successfully, but these errors were encountered: