How to generate a full entity relationship diagram?

2012-12-08
2012-12-10
  • Sam Hamilton

    Sam Hamilton - 2012-12-08

    Hey,

    Perhaps I am missing something to run but I am trying generate a full ERD of all the entities in mantle. So I grabbed a copy of Moqui, added Mantle and PopCommerce and then ran:

    gradle build
    gradle load
    gradle run
    

    I then ran the ERD but it seems not all the entities specified in Mantle are pushed into the database?

    Is there another command I should be running to get the whole of Mantle to load?

    Thanks
    Sam

     
  • David E. Jones

    David E. Jones - 2012-12-08

    By default Moqui only creates tables for entities when they are used. This is meant to help avoid the problem that comes up occasionally with OFBiz where people only want to use a small set of the applications, and corresponding data model, but end up with a bunch of empty and unused tables in the database.

    Anyway, to add tables for all entities that don't have them just set the entity-facade.datasource.@startup-add-missing attribute to true in the moqui conf file for the datasource you want to pre-load, and it will load all of them on startup (either gradle load or gradle run).

    I just tested this running on Derby and the latest Moqui and Mantle code, and it creates all of the tables just fine, but a couple of the reverse-fk indexes fail because of the algo for generating the index names generates a couple of conflicts right now.

    BTW, there was one bad relationship def in OrderAdjustment, but I just committed a fix for it... so update mantle before running this.

     
  • Sam Hamilton

    Sam Hamilton - 2012-12-10

    Thanks David that works great!

     

Log in to post a comment.