Custom Module Configuration
-
Re: New Developer Documentation
Hello Terry,I'm currently following the example in the 4.0 documentation to crate the sample custom module and I ran into a problem. The com.infiniteautomation.mango.spring.db.AbstractTableDefinition file does not show up in my list of Dependencies and I'm wondering is this an old file because I do not see it in the Mango Core package.
What could I be missing?
-
@Curtis it looks like you ran into the same problem mentioned in a comment the original post. The docs are out of date so I suggest you look at the public modules repository for some examples.
A good example of a module with additional SQL tables would be the Maintenance Events module here:
https://github.com/MangoAutomation/ma-modules-public/tree/4.3.x/Maintenance Events
Above is a link to the code that would be compatible with Mango 4.3.x
By placing a create-Tables-H2.sql file with the table definitions into the resources folder JOOQ will generate the necessary Table and Record classes during the build for you to use your DAO implementation. See the MaintenanceEventDao class for how that works.
Its sort of a chicken-egg problem where you first create the schema, perform a generate phase of the build and then have the generated source to continue your implementation.
-
@terrypacker
Thank you