How to Register Dialect Correctly for Spring JPA application. #1868
-
I have followed documentation to register a custom dialect. Problem is that functions are created at the time of Criteria.getDefault() call only and registering custom dialect never helps for microsoft. I have overriden String to use varchar(max) in custom dialect but is not getting picked up in CAST_STRING. Any help would be appreciated thanks. Only option I see currently is to rewrite CriteriaBuilderConfigurationImpl. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You could also re-register that one function through a custom |
Beta Was this translation helpful? Give feedback.
-
There are two issues with SQL Server Dialect
Thanks for answering. As you said I am overriding functions itself as overriding Dialect does not help. I believe first point should be handled as bug fix. Second point might depends on end users but I believe CONCAT function should be made default for sql server. |
Beta Was this translation helpful? Give feedback.
You could also re-register that one function through a custom
CriteriaBuilderConfigurationContributor
, but apart from that, this is unfortunately the only way to achieve this.I'm open to making the
DbmsDialect
registration more dynamic though so you can achieve what you desire. Can you please explain why you want to usevarchar(max)
instead? If there is a bug in Blaze-Persistence, we can fix that :)