Previously, we used to generate database tables through the powerdesigner Object Oriented Model, and then generate the nhibernate Object class and ing files through the code generator. It is not very straightforward.
With the built-in functions of powerdesigner 15, you can generate the data access layer of nhib.pdf. However, it is not very good to use it in the actual environment by default. You can change the template to generate what you need. The following are the actual steps.
Create an object oriented model and select c #2.0 and nhibted.
Change the model properties and change the nhibernate settings.
Add property to the class and set an id
You can add Configuration File Settings here.
Design class diagram
The most critical step is to set the mapping editor and set it in the tool menu. Otherwise, the nhibernate file and data access layer cannot be generated.
You can see the preview code. Use generation c #2 code in the language menu to generate a physical file. It is best for a physical database to be generated by converting the object oriented model.
You can set the vs version to generate the nhibernate code, including vs2005 and vs2008.
Similar to the extension model, you can also generate the ado.net data access layer and unit test.
Select the data access layer based on hibernate or ejb3 that can be generated by using the java language.