SQL Parsing Error #1439
Labels
for: eclipse
something that is specific for Eclipse
for: vscode
something that is specific for VSCode
status: works-as-designed
theme: spring-data-support
theme: validation
type: bug
Milestone
There is an issue with the parsing of the native SQL Queries for both the .id options and the Group by clause
Sample Code for Quick Copy:
@query(
value =
"""
SELECT v.name AS vendor_name,
COUNT(m.id) AS mould_count
FROM moulds m
LEFT JOIN vendor v ON v.id = m.converter_id
WHERE AND m.mould_code_lifecycle_stage != 'RETIRED'
AND m.mould_type = 'PRODUCTION'
AND m.id IN (SELECT unnest(allowed_moulds::bigint[])
FROM user_allowed_items
WHERE user_id = :userId)
GROUP BY v.name
ORDER BY mould_count DESC
LIMIT 5
""",
nativeQuery = true)
List<Object[]> getTopConverter(@param("userId") Long userId);
Errors Thrown:
The text was updated successfully, but these errors were encountered: