Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-435

Introspect an existing database to support simple automatic JPA entities

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: