Announcement Announcement Module
Collapse
No announcement yet.
How to add new tables to existing application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add new tables to existing application

    I have created new web application using roo, for one table in existing database, Now i want to add new table, so i created a new entity and field, but when i issue command
    controller scaffold ~.web.MyExistingApp
    It gives me error application exists,

    so is there any command to recreate web appication

  • #2
    Worked, i just did
    controller scaffold ~.web.MyExistingApp1

    Is there a way to copy existing project and start working with copied project,


    and it created required files, i am going to add GWT and spring webflow and see how they work,

    Comment


    • #3
      Can you please include all Roo commands you issued so we can try to reproduce this?

      You can try deleting all web artifacts and reissuing the controller command.

      Comment


      • #4
        This is what i did,
        First i created a sample project with following commands
        project --topLevelPackage com.tauck
        persistence setup --provider HIBERNATE --database DB2 --databaseName DB --userName user --password pass
        entity --class ~.model.XrefGlobalId --identifierField GLOBALIDID --identifierColumn GLOBALIDID --table XREF_GLOBALID
        field string --fieldName GLOBALIDCD --notNull --sizeMax 16 --type java.lang.String
        field string --fieldName DESCRIPTION --notNull --sizeMax 40 --type java.lang.String
        test integration
        controller scaffold ~.web.MyWebApp
        perform eclipse

        After this got working i created a new entity

        entity --class ~.model.XrefChargeId --identifierField CHARGEID --identifierColumn CHARGEID --table XREF_CHARGEID
        field string --fieldName CHARGECD --notNull --sizeMax 16 --type java.lang.String
        field string --fieldName DESCRIPTION --notNull --sizeMax 40 --type java.lang.String
        test integration
        controller scaffold ~.web.MyWebApp

        I got error that MyWebApp exists,

        So then i changed the last command
        controller scaffold ~.web.MyWebApp1 and it worked and created required jsp file

        Comment


        • #5
          Just a tip, "controller all" is usually easier.

          Comment

          Working...
          X