Nov 27th, 2009, 08:27 AM
Roo + JAG / GRAG
Me too I'm interested.
It'd be handy for all of us who have an existing demo app in Mysql to see what Roo would create when feeding it with the data source url.
A bit like GRAG is doing for Grails or JAG for Java applications.
Or, doing like GRAG did, piggybacking on JAG..
Too bad my time is so scarce for a plugin dev..
Last edited by stephaneeybert; Nov 27th, 2009 at 08:34 AM.
Nov 27th, 2009, 07:08 PM
I've created a new Jira issue - https://jira.springsource.org/browse/ROO-435 - for database reverse engineering. Votes and comments are welcome in Jira for this.
Jan 8th, 2010, 12:50 AM
Hi Ben, the issue http://jira.springframework.org/browse/ROO-435 is one of the most popular issues, in which release will you include it?
Jan 8th, 2010, 01:04 AM
It's very high up my priority list. Even Rod Johnson has asked me to do it, so it'll get done. :-)
Realistically we'll be focusing on 1.0.1 in January and some scoping work to do with the GWT feature. I'll likely get to it in February. Contributions, as always, are very welcome. A valuable first pass would be to introspect a DB and create some value objects that represent the desired entities, fields and the correct JPA annotations that should go on them. If we had such value objects it would be trivial for me to finish the job by causing Roo to amend the project files properly. It would also allow database-specific adapters to be written where required.
Jan 13th, 2010, 02:22 AM
We (DiSiD team) are working on this issue. Our approach would be to develop an addon that uses Hibernate Tools and custom Hb Tools Templates to generate Entities with both Roo and JPA annotations.
We have splitted the work in 2 phases:
1. Develop custom hbt templates and use Hibernate Tools manually to generate Roo Entities
2. Develop the addon that manages the reverse eng. process. Basically the addon should give us options to customize the rev. eng. process (i.e. by managing hibernate.reveng.xml) and it should run the rev. eng. process.
We would like your thoughts about this approach.
Jan 14th, 2010, 05:22 PM
I also saw someone using the Eclipse 3.5 "create entities from database" feature yesterday, and that works with Roo apps. So you need not use Hibernate Tools unless you particularly wish to...
Native database introspection will be part of Roo 1.1.0.
Jan 14th, 2010, 07:48 PM
Ben, is the "create entities from database" a standard feature of Eclipse 3.5?
Jan 15th, 2010, 12:41 AM
We don't have special interest in using Hibernate Tools Some time ago we searched for one tool/lib for reverse engineering that was independent of any IDE and integrated into our build cycle (Maven2 or Ant). This is the reason because we chose HBT.
Native database introspection will be a great feature but I don't know when it is planned to release this feature. In the meantime, it is a good option to use HBT manually (see phase 1 posted above).
Ben, reverse engineering is one of the most powerful features of HBT, it gives us a fine control over rev. eng. process: schema selection, type mappings, table filters, table configuration, etc. Please, take a look at it, it could come in useful to elaborate Roo native support requirements.
Just to know, which is the problem you see in an HBT addon?
Jan 15th, 2010, 05:20 PM
I don't see any problem specifically with the Hibernate Tools approach, I was just letting you know there is an alternative. I must confess, though, that I haven't used HBT for quite some time and last time I did it was adding Hibernate proprietary annotations to the created types. The Eclipse approach only used standard JPA annotations, which is obviously preferred (and HBT may indeed do that these days as well).
Roo will use its own from-scratch reverse engineering approach as opposed to building on these existing approaches. I want to leverage the ITDs as part of the reverse engineering, so people can re-introspect a DB at any time and update the ITDs accordingly.
Jan 16th, 2010, 08:02 AM
Re-instrospection sounds really good Thanks for sharing!
Tags for this Thread