We, the OpenAccess ORM team, believe that an ORM solution should not only be easy to use and time-saving, but also flexible enough to reflect your needs. For instance, it is important that the names we generate comply exactly with your conventions, rather than being enforced. For that purpose we have provided the Naming Settings dialog a while ago, offering various naming options for the model on Class, Property and Field level.
Now we are proud to present the new flexibility we have exposed for generating the names of the tables and columns in your database - the Database Names Settings. They used to be available only as an API, but now they are visualized and automatically offered to you when creating empty models. You can also amend them from the Model Settings dialog at any time:
First, the dialog is offering you to base the names of the database and columns on either Properties or Field names, whichever suits your purpose better. After that, the name defined in your model is processed using the selected algorithm:
- Use input string as object name will not process the names provided in the model, unless it is necessary to shorten them to fit the requirements of a specific backend or to remove some invalid characters. Optionally you can change the reserved words or not.
- Generate valid object name will use the OpenAccess algorithms for the database names that we used to do by default up until now. Camel casing will be removed and a word break symbol will be applied before each of the capital letters to preserve the words separated. All the reserved words will be changed in order to avoid any issues with the backend. This approach is safer but the names might be less readable in certain cases.
In addition, you are now in control whether you would like to delimit your identifiers or not.
If you have existing models, don’t worry – the visual settings are backward compatible so your model will continue using the same names. For all the new models you create you can expect different default options, based on your requests – the columns to be named as closely as possible to the properties that you see in the Visual Designer.
I hope that the new settings, available already in Q2 SP2 2012 of Telerik OpenAccess ORM, will make your life easier when creating or updating your database. In case they don't meet your expectation, just provide us your feedback and we might apply your ideas in the next release.
Stay tuned as we will start presenting the new features in Q3 2012 very soon!