Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Is it possible to create tables in databese by some plugin form JPA projects in Eclipse?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have annoted classes (entities). But I can use orm.xml too if there is no solution for entities.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume you are wanting to create your tables based on your mappings (for development only)

If you are using hibernate as your persistence provider have a look at the hibernate.hbm2ddl.auto property.

As far as JPA is concerned you can define your metadata in your annotations as well for example:


This will generate a unique constraint on the column when the tables are generated.


Specifies the nullable attribute for the column


Specifies the length on the column


Specifies the precision and scale.


You get the idea. If there is something in particular you were looking for you will have to let us know.



 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. You helped me a lot.
reply
    Bookmark Topic Watch Topic
  • New Topic