Skip to content

Conversation

@xavierjefferson
Copy link

@xavierjefferson xavierjefferson commented Dec 21, 2023

Offer a new Microsoft Access driver option, using the Microsoft.ACE.OLEDB provider in the connection string template.

USER MUST HAVE Microsoft Access Database Engine 2016 Redistributable installed. 32-bit if NMG is running as 32-bit, 64-bit if NMG is running as 64-bit. https://www.microsoft.com/en-us/download/details.aspx?id=54920

In code generation, wrap all string literals for table, column, constraint, and index names in backtick marks (`ObjectNameHere`) so NHibernate processes names with spaces or reserved words properly. Without the backticks, NHibernate would throw exceptions for a column named "INDEX" on some db providers because it's a keyword; or a column named "Customer ID" on likely all DB providers because of the space character.

This latter change is a hold-over from Hibernate (Java)

Reference:
https://groups.google.com/g/nhusers/c/-46QXkkXVV0
https://sdesmedt.wordpress.com/2006/09/04/nhibernate-part-4-mapping-techniques-for-aggregation-one-to-many-mapping/

from Hibernate:
https://stackoverflow.com/questions/50783644/add-backticks-to-column-names-in-hibernate

…umn, constraint, and index names in backticks so that names with spaces or reserved words are handled properly by NHibernate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant