質問

I am using MyEclipse to generate JPA entities (through EJB3 Reverse Engineering). So if my table name is Patient then the entity will be generated by the name of Patient but I want the generated entity to have an appended suffix of Entity i.e. the resulting entity will be PatientEntity. Is this possible? If yes, then a concrete working example will be highly appreciated. Thanks.

PS. I am using JPA 2.0, EJB 3.1 and MyEclipse Enterprise Workbench 10.1

役に立ちましたか?

解決

There isn't a way to do this automatically but if you go through the wizard, page by page (so press Next on each screen) you will eventually get a page where you can enter the class for each entity. Unfortunately, you have to enter the fully qualified class name (including the package). If you don't fill in the Class field, the type will get the default name (the table name) and be put in the package that you specified on an earlier screen.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top