• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have annoted classes (entities). But I can use orm.xml too if there is no solution for entities.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks. You helped me a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic