Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: Using Roo with an existing database

  1. #21
    Join Date
    Mar 2008
    Posts
    255

    Default 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.

  2. #22
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #23
    Join Date
    Sep 2004
    Location
    Valencia, ES
    Posts
    92

    Default

    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?

    Thanks
    Enrique Ruiz
    DiSiD - http://www.disid.com

  4. #24
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  5. #25
    Join Date
    Sep 2004
    Location
    Valencia, ES
    Posts
    92

    Default

    Hi Ben,

    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.

    Thanks.
    Enrique Ruiz
    DiSiD - http://www.disid.com

  6. #26
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  7. #27
    Join Date
    Oct 2005
    Location
    Mobile, AL
    Posts
    345

    Default

    Ben, is the "create entities from database" a standard feature of Eclipse 3.5?

  8. #28
    Join Date
    Sep 2004
    Location
    Valencia, ES
    Posts
    92

    Default

    Hi Ben,

    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?
    Enrique Ruiz
    DiSiD - http://www.disid.com

  9. #29
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  10. #30
    Join Date
    Sep 2004
    Location
    Valencia, ES
    Posts
    92

    Default

    Re-instrospection sounds really good Thanks for sharing!
    Enrique Ruiz
    DiSiD - http://www.disid.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •