简体   繁体   中英

Creating Entities and Generating Database Tables (JSF / JPA)

sorry about this question not having much data, but i am lost, and thought if anywhere this place might be able to help me

i am trying to use entities to create tables in a database rather than creating the database first then creating the entities, all the examples etc on the internet i have found for netbeans show only to create the entities from a pre existing database, it is a requirement that i create the database from the entities

how can i achieve this

i am running Netbeans 7.4, it is a JSF web app and the database is derby

Thanks guys, again sorry for the poor question but don't know where else to look

Consider starting to read a Hibernate documentation, it help you a lot in start discovering how you can create the schema from the entitites.

http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/

Also once you know how to use a little bit hibernate is a good starting point to start learning JPA annotations.

http://docs.oracle.com/javaee/6/tutorial/doc/bnbpz.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM