Hi all,
I have just released a new module that I think is really useful
(actually I hesitated to provide the functionality per default in
Play! so you don't have to enable the module):
http://www.playframework.org/modules/db
In short:
* play db:export --output=bla.sql will generate a sql script to create
your database based on your actual object model
* play db:import will import your database table into your domain
model (so it generates java files that extends JPASupport)
It is necessary to enable the module and to configure your database
connection in the application.conf file. I think that is pretty simple
and that is why it is Play! compatible.
The next step for this module will be to generate diff between the
database and the object model automatically.
The obvious next step will then be to merge this module and the DB
migrate module.
In term of POJO generation, it would also be nice if this module could
generates the CRUD controller if asked for. Another feature would be
to generate the object model as scala objects.
Under the hood the module uses a modified hibernate tools (so it works
with Hibernate 3.5). Hibernate tools uses freemarker to generate
files, so I had to modified those as well. I will publish all the
sources shortly.
As usual, please report all the bugs on
http://github.com/pepite/play--database
. Contribution and help are more than welcome :)
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to
play-fr...@googlegroups.com.
To unsubscribe from this group, send email to
play-framewor...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/play-framework?hl=en.