nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

Regression bug with enums used as parameter for string column

Open csharper2010 opened this issue 5 years ago • 2 comments

It used to be possible to provide an enum as a parameter for HQL queries where a criterion using that parameter matches on a string column.

I know that there are different options to have an enum directly in the property and map it to a string column on the database but sometimes there just might be the convention to use an enum for defining the possible values of a string column.

I would generally argue that enums should be treated like strings when mapped on string columns.

csharper2010 avatar Nov 25 '20 16:11 csharper2010

This looks like an user error. I'll be willing to accept a less invasive changes.

hazzik avatar Nov 30 '20 00:11 hazzik

It used to be possible to provide an enum as a parameter for HQL queries where a criterion using that parameter matches on a string column.

Your wording implies it was previously possible but is no more. Have you more information on this? In which version this would have ceased working, in which version was it working? I would like to clarify from which version a regression would have occurred on this subject.

fredericDelaporte avatar Dec 13 '20 18:12 fredericDelaporte