Spring Roo
  1. Spring Roo
  2. ROO-435

Introspect an existing database to support simple automatic JPA entities

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.M3
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      Most real-world enterprise applications are built in one of two ways:

      1. Starting with the relational schema and then building the application on top of it.
      2. Starting with the required web views and then building the application to support them.

      It would be nice if Roo offered extended support for #1, as many people have existing databases they wish to introspect and then "web expose". The usage scenario would be Roo commands like:

      project com.foo.helloworld
      persistence setup --provider OPENJPA --database POSTGRESQL
      database properties set --key database.url --value jdbc:postgresql://localhost:mydb
      database reverse
      controller all

      In this example "database reverse" would scan all tables in the localhost:mydb database and create an entity for each table. Unlike a normal entity, though, the fields would be added to a EntityName_Roo_Reverse.aj ITD. The benefit of adding the fields into an ITD is "database reverse" can automatically remove or update the EntityName_Roo_Reverse.aj with each subsequent execution. This is very useful if the database is changing.

        Activity

        Hide
        Andrew Swan added a comment -

        If you're stuck on Roo 1.0.2 or earlier and you need to be able to generate Roo-managed JPA entities from an existing database, here's an approach that I've used successfully: http://forum.springsource.org/showthread.php?t=90950.

        Show
        Andrew Swan added a comment - If you're stuck on Roo 1.0.2 or earlier and you need to be able to generate Roo-managed JPA entities from an existing database, here's an approach that I've used successfully: http://forum.springsource.org/showthread.php?t=90950 .
        Hide
        Dane Bezuidenhout added a comment -

        Eagerly awaiting this feature, will be incredibly useful and an essential part of Roo. "database introspect" doesn't seem to be in 1.1.0M1, will it be in the final 1.1.0 release? Could the team update us on progress please?

        Show
        Dane Bezuidenhout added a comment - Eagerly awaiting this feature, will be incredibly useful and an essential part of Roo. "database introspect" doesn't seem to be in 1.1.0M1, will it be in the final 1.1.0 release? Could the team update us on progress please?
        Hide
        Alan Stewart added a comment -

        It should make the 1.1.0.M3 release.

        Show
        Alan Stewart added a comment - It should make the 1.1.0.M3 release.
        Hide
        Florian Adler added a comment -

        MinuteProject 4 Roo:

        MinuteProject (http://minuteproject.wikispaces.com/) is a opensource project that already generates backend on top of Spring/hibernate/JPA/iBatis based on a DB schema.
        Most recently, MinuteProject starts generating front end also: for Vaadin (on top of a spring (generated backend)) and OpenXava.
        This little post to inform you that MinuteProject works on parallel solution to this Jira issue.
        MinuteProject 4 Roo is a new stream of templates in MinuteProject that will available in release 0.5.

        Florian.

        Show
        Florian Adler added a comment - MinuteProject 4 Roo: MinuteProject ( http://minuteproject.wikispaces.com/ ) is a opensource project that already generates backend on top of Spring/hibernate/JPA/iBatis based on a DB schema. Most recently, MinuteProject starts generating front end also: for Vaadin (on top of a spring (generated backend)) and OpenXava. This little post to inform you that MinuteProject works on parallel solution to this Jira issue. MinuteProject 4 Roo is a new stream of templates in MinuteProject that will available in release 0.5. Florian.
        Hide
        Alan Stewart added a comment -

        Initial support for db-reverse engineering added for Roo 1.1.0.M3. All new related feature requests and bugs need to be logged against new Jira tasks.

        Show
        Alan Stewart added a comment - Initial support for db-reverse engineering added for Roo 1.1.0.M3. All new related feature requests and bugs need to be logged against new Jira tasks.

          People

          • Assignee:
            Alan Stewart
            Reporter:
            Ben Alex
          • Votes:
            129 Vote for this issue
            Watchers:
            92 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: