-
Notifications
You must be signed in to change notification settings - Fork 933
Remove dialect instantiation in AddDeserializedMapping #1703
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
Conversation
@@ -260,7 +309,7 @@ public void AddImport(string className, string rename) | |||
|
|||
public Table AddTable(string schema, string catalog, string name, string subselect, bool isAbstract, string schemaAction) | |||
{ | |||
string key = subselect ?? dialect.Qualify(catalog, schema, name); | |||
string key = subselect ?? BuildTableNameKey(catalog, schema, name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Keys" property of tables
dictionary and so key
here are the internal things and are not exposed outside, so we are not concerning by dialect specific qualification of it (eg catalog.schema.table
in SQL Server vs catalog_schema_table
in SQLite and SQL Server Compact).
Is the "possible breaking change" the fact that some primary keys may have their name changed? Or something else I have missed? |
There are following possible breaking changes:
|
Yes I should have thought about |
@fredericDelaporte what about |
For It is then very likely than very few (if any) users may have done that. If some have done it, it could only serves purpose unrelated to NHibernate. So anyway they should have used something else as a base class. That is why I think we should accept this possible breaking change for a minor release. (The same reasoning could be applied to |
Replaces #787
The sole reason the dialect was created in the mapping was to generate a name for PK's in Join and PersistentClass classes.
The previous code was bothered by invoking proper rules to escape the quoting characters. But, we do not need to be concerned by the escaping rules: instead, we try to trim the quotes if we get a quote character on the edge of wanted alias sub-string.
Possible breaking change:
dialect
field in various*Binding
classes. These classes are not expected to be derived by users, as there is no way to use custom descendants with NHibernate.