I\'m playing around with some JPA stuff, changing the mappings to see how they\'re supposed to be etc. It\'s basic experimentation. However I can\'t find a tool that will si
I don't think there is an universal way of doing this with JPA, you have to directly use the underlying JPA implementation to achieve this.
For Hibernate, there are several possibilities:
hbm2ddl
automatically.For EclipseLink (formerly Oracle TopLink, the JPA 2.0 RI) see Using EclipseLink JPA Extensions for Schema Generation. In principle it is very similar to Hibernate, although at first glance I don't see anything that could be used as a stand-alone utility for creating a DB script.
Other JPA implementations (BEA/Oracle Kodo, Apache OpenJPA) probably have their own specific methods of achieving this.