Skip to content
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

The sql type of the CultureInfoType is too short #3473

Closed
zgabi opened this issue Jan 24, 2024 · 1 comment · Fixed by #3481
Closed

The sql type of the CultureInfoType is too short #3473

zgabi opened this issue Jan 24, 2024 · 1 comment · Fixed by #3481

Comments

@zgabi
Copy link

zgabi commented Jan 24, 2024

The current generated SQL type for the CultureInfo object is string(5):

internal CultureInfoType() : base(new StringSqlType(5))

But some culture names are much longer. The longest culture names are 11 characters:
en-US-POSIX
mni-Beng-IN
sat-Olck-IN
shi-Latn-MA
shi-Tfng-MA
tzm-Arab-MA
tzm-Tfng-MA
vai-Latn-LR
vai-Vaii-LR

They are very specific, but in our usecase we use cultures with length of 10 characters. So this is a real problem for us.
Now we get the following exception:
NHibernate.Exceptions.GenericADOException: 'could not execute batch command.[SQL: SQL not available]'
SqlException: String or binary data would be truncated in table ...

@fredericDelaporte
Copy link
Member

Fixed by #3481. The mapping of properties of this type will accept the length setting, allowing to use another length than the default 5 if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants