Results 1 to 5 of 5

Thread: How to add new tables to existing application

  1. #1

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

    Default

    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,

  3. #3
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  4. #4

    Default

    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

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

    Default

    Just a tip, "controller all" is usually easier.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

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