aspose file tools
The moose likes Object Relational Mapping and the fly likes Is it possible to create tables in databese by some plugin form  JPA projects in Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Is it possible to create tables in databese by some plugin form  JPA projects in Eclipse? " Watch "Is it possible to create tables in databese by some plugin form  JPA projects in Eclipse? " New topic
Author

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

Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
I have annoted classes (entities). But I can use orm.xml too if there is no solution for entities.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

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.




[How To Ask Questions][Read before you PM me]
Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
Thanks. You helped me a lot.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Is it possible to create tables in databese by some plugin form JPA projects in Eclipse?
 
Similar Threads
JPA - understanding OneToMany bidirectional relations
coupling and cohesion
Pro EJB 3: Java Persistence API (Pro)
shared id for 2 tables.
Secure an Entity bean from writing