-
Notifications
You must be signed in to change notification settings - Fork 687
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
Allow specifying length
for <index>
element
#363
Comments
@carpics I see. what do you recommend we do in that scenario? we can't detect encoding of a database in Fluent - that's NHibernate work I believe |
@chester89 Yes, I know it's not possible to detect encoding of a database in Fluent. I already suggested above that solution would be to add |
@carpics you want to handle that on the mapping side, understood. let me look into whether that's easy to add |
Yes, that would be great if it's possible. |
length
for <index>
element
I have created auto mapping which maps Dictionary into table like this:
Which results in table
PostProperties
with columns:The issue is that this mapping by default creates Index column as
VARCHAR(255)
. But it fails to create the table entirely for databases which useutf8mb4
encoding, because the maximumVARCHAR
size on an index column is191
withutf8mb4
encoding (the recommended encoding).This should be able to be resolved by adding a
Length
property toIndexPart
and using it likeElementPart
does.The text was updated successfully, but these errors were encountered: