ORVE WS (Dynamic) (11) Persisting retrieved records and other control information (3). Table creation
0. Introduction Now that the JPA entities have been defined in the ximodante.sicres.multiclassjpa package it is time to let JPA create tables for us in the database. This link has been followed 1. Creation of Tables in the schema Here is a simple class for this purpose 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 package ximodante . jpamanager ; import javax.persistence.EntityManager ; import javax.persistence.EntityManagerFactory ; import javax.persistence.Persistence ; public class JPATest { /** * @param args */ EntityManagerFactory emf = null ; EntityManager em = null ; /** * This is only for creating tables * @param args */ public static void main ( String [] args ) { // TODO Auto-generated method stub EntityManagerFactory emf = Persistence . createEntityManagerFactory ( "sicresh2" ); EntityManager em = emf ...