Recently, I have been building a framework on my own to generate a hibernate object. I tried many methods. The company used ER/studio and then generated it through ant. It's pretty good.
However, you need to customize some macros. There is also a data dictionary, and it is combined with the DaO processing of the company framework. This increases the coupling degree. Therefore, my own framework is bound to the whole project design. I personally think that using er to generate logical and physical models is the best way.
ER/studio has this advantage. You only need to compare the entity generation with the database generation. Synchronize databases at the same time. Achieve a win-win situation. The emergence of powdesign12 perfectly integrates hibernate. We can use it to generate entities and ing files, and synchronously update logical and physical models. It is a good modeling tool. Highly recommended!
Currently, many web companies use myeclipse to generate entities. The generation process is simple. You only need to create a physical model. It will be OK through hibernate reverse engineering. Note that the version configuration in hibernate needs to be configured. The table field name must also be version. It can recognize generation...
<Version name = "version" type = "long">
<Column name = "version" precision = "10" scale = "0"/>
</Version>
The above is just my own experience. I hope to discuss it with you. Thank you!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.