Announcement Announcement Module
Collapse
No announcement yet.
DBRE leaving out _DbManaged and _ToString Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DBRE leaving out _DbManaged and _ToString

    Hi, I ran DBRE against a live mysql db with approximately 100 tables. I now have all the entities in their ITD managed forms - but one entity, call it Automobile didn't get an Automobile_Roo_DbManaged or Automobile_Roo_ToString file - it appears that the rest of the entities did though. The DBRE task completed with no errors.

    Can I rerun DBRE for just one entity? Can I create one by hand and have roo recognize it? I don't know why it happened but I'm interested in the best way to proceed.

    Thanks.

  • #2
    Are there other fields in the table besides a primary key or version field? These two fields are added to the entity ITD,

    If there are other fields, when you re-start Roo, is the Roo_DbManaged ITD created?

    Comment


    • #3
      There are many fields in the table including primary key, 4 FK's to other tables and approx 20 other fields. In the entity ITD there is only the PK field and crud methods - no version. Same for all the other entities that were successfully created with all their other fields in the dbmanaged ITD. Also I have restarted roo several times and the dbmanaged entity is not created.

      I'm thinking I should just run rerun dbre with --includeTable option for just this table. If I do, will dbre handle the FK's correctly to the other tables that are already set up right?

      Comment


      • #4
        The --includeTables will only bring back that table and will delete all other tables in the .roo-dbre file and in-turn will delete all your entities except the table you want to include. So this is not the option to use.

        Please raise a Jira request and attach your MySQL DDL and .roo-dbre file. I need to be able to reproduce it.
        Thanks

        Comment


        • #5
          OK, thx. While I put that together would it be worth a try to shut down roo and attempt to create the missing ITD's by hand and then restart? Would that fool roo into thinking it had generated the entity/ITD's correctly?

          Comment


          • #6
            ITDs are managed by Roo. If you create an ITD that wasn't there it will be deleted. If you delete an ITD it will be recreated and if you edit an ITD, your changes will be overwitten when Roo is restarted.

            Comment


            • #7
              I found my problem - I imported my mysql schema to my local dev box prior to running dbre. There was one of the 188 tables that didn't make it in. The partial entity was dependent on that missing table so it was not completing correctly. Didn't see an error for it though when the dbre ran.

              Comment

              Working...
              X