-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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
Spring boot again #236
Spring boot again #236
Conversation
@@ -43,10 +43,10 @@ public interface NodeRepository extends TaxonomyRepository<Node> { | |||
LEFT JOIN n.parentConnections pc | |||
WHERE ((:#{#nodeTypes == null} = true) OR n.nodeType in (:nodeTypes)) | |||
AND (:isVisible IS NULL OR n.visible = :isVisible) | |||
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, :metadataFilterKey) IS NOT NULL) | |||
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, cast(:metadataFilterKey as text)) IS NOT NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er disse cast'ene fordi det er optionals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usikker. Hibernate klaga på at det var sammenligning av tekst og object men ved å legge til cast så funka det. Samme med json_contains i linja under.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Det skremmer meg jo litt, men så lenge det fungerer 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feilmeldingen uten cast: function jsonb_extract_path_text(jsonb, bytea) does not exist
. Så av en eller anna grunn så skjønner den ikkje at det er tekst uten at vi forteller den det, men tolker det som er byte array.
Nyeste spring boot + bruk java 21 som runtime