-
Notifications
You must be signed in to change notification settings - Fork 934
Casting types inside formula throws exception #1832
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
Comments
See Types cast in PostgreSQL documentation:
Better use the syntax which is conform to SQL standard. I do not think NHibernate's parsing logic should try to accommodate every vendor specific syntax, especially when they have standard counterparts. |
Now formula looks like that @fredericDelaporte The type gets translated to: |
This one happens because in the case of PostgreSQL, types names are not included in dialect keywords. (This seems to date back to 0ad0ba1 (#654), see here. @ngbrown, do you remember why is this?) You should be able to overcome this by adding |
@fredericDelaporte Thanks, that resolved my issue. |
Uh oh!
There was an error while loading. Please reload this page.
NH version: 5.0.3
When we started using filters inside HBMs maps that contains formulas with postgresql type casting, NH started to throw exception:
After some debugging I found value that throws:
filterParameterName hase value set to :text
Example formula that throws exception:
formula="initcap(`IMIE`)::text || ' '::text || initcap(`NAZWISKO`)::text"
The text was updated successfully, but these errors were encountered: