Rescaffolding from DB quickly when adding/modifying a DB table

  1. MyEclipse IDE > Spring Development

This topic contains 2 replies, has 2 voices, and was last updated by  Luis Pedro 4 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #499253 Reply

    Luis Pedro


    following the problem I explained here (tl;dr : a full rescaffolding for me takes hours) I was wondering: how can I avoid doing a full rescaffold when all I want to do is update the generated code just for the tables I changed/added?
    I’ll make an example: I have table “elements”, “elementdetails”, “otherelementdetails”; the latter 2 tables have a foreign key reference to the primary key of “elements”. I scaffolded from this DB model and all is fine and dandy.
    Now suppose I add some attributes to “elementdetails” and want to rescaffold. I can do a full rescaffold using all tables, which will work but as I said for me takes hours (my model has 90+ tables…).
    If instead I do a rescaffold selecting only the “elementdetails” table, the rescaffold is much quicker but I end up with domain classes that are missing the reference to the “elements” table.
    I could select both “elements” and “elementdetails”, but if the criterion is having to select the table I want to rescaffold together with all the tables referenced, and if this has to be done recursively, this pretty much amounts (in my case) to doing a full rescaffold, because “elements” is the central concept in my model and about all tables reference it directly or indirectly.

    So, is there a notion of “rescaffold just the table I modified” that will keep correct relationships, or am I better off just changing the java and SpringDSL code by hand when the modifications are small?

    MyEclipse Enterprise Workbench
    Version: 2016 CI 7
    Build id: 14.0.0-20160923

    DB: MySQL 5.5

    • This topic was modified 4 years, 9 months ago by  Luis Pedro.
    #499486 Reply



    Sorry for the delay; we’ve been looking into this. I’m afraid that there is no incremental capability as such. You can select tables to be scaffolded (on the Select Database Tables page of the scaffolding dialog) but if those tables have foreign keys to tables that haven’t been selected, it’s likely that the appropriate links won’t be created.

    I’ve asked development to look at this further and, if they have more suggestions, we’ll add a reply here. In the meantime, could you give details of how you are scaffolding (which options you are selecting in the dialog) as this may help guide suggestions?

    Sorry for the inconvenience.

    #499497 Reply

    Luis Pedro


    a screenshot of the options I select is here:

    these are screenshots for when I select all tables, but you get the idea. To use our example above, it would be cool if I could do something like the following:
    – choose both “elements” and “elementdetails” for scaffolding;
    – check some option for the elements table that says “assume this is already generated – don’t redo it”
    – then it would only scaffold “elementdetails”, and only generate stuff on its side; it would be my responsibility to make sure that “elements” is still the same table as it was in the previous scaffolding.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Rescaffolding from DB quickly when adding/modifying a DB table

You must be logged in to post in the forum log in