Generating Tables from existing Entities in Netbeans

entity-framework java jpa jsf-2 netbeans

Question

I have a JSF project and I have a set of existing Entity classes. Is there anyway in Netbeans to generate Tables from my Entities without having to use the new entity wizard?

I found this functionality in Eclipse under the JPA Tools -> Generate Tables from Entitys as seen here: https://www.eclipse.org/webtools/dali/docs/3.2/user_guide/tasks007.htm

Thanks, the help us much appreciated.

1
0
3/30/2014 11:31:15 AM

Accepted Answer

Do you already have an Persistence Unit? If not, create one as follows. Right click on the project, select New -> Other. Click the Persistence Category, then the Persistence Unit file type. A persistence.xml file (PU) will be created. Include your entity classes in the PU and set the Table Generation Strategy to Create. When you run your project, the tables will be created.

1
6/10/2014 12:12:22 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow