Docs for mapping of tables to liquibase?

I am part of a group of students in a CS class, we were asked to create a module for openMRS. We were able to create the module, which as for now at the moment of installation into openMRS, it creates its own tables to the openMRS database. We also already have the **.gsp page that is going to be providing our features, however we need help in finding detailed documentation on how to do the mapping between: hibernate, DAO, Service, etc, so that we can interact with (make quieries to) the tables that our module creates on the database from the **.gsp page. where can I find information about doing the mapping of my tables? Any information will be grately appreciated. Thanks in advance

The convention i know of is, create your domain, DAO interface for domain, hibeate DAO implementation, service interface for domain, service implentation. Look at what i did here if its helpful,

https://github.com/openmrs/openmrs-core/pull/1783/files

1 Like

I doubt that we have a page that demonstrates this i.e end to end. In theory, you need to create the tables following instructions on this page and map them to your domain objects and register the mapping files as mentioned here, then add a module service/DAO following instructions on this page. For sure we need a page that demonstrates all these steps.

If you use the openmrs module maven archetype as shown here, most of the above is automatically done for you, you might also want to look at this creating your first module page

1 Like

Thank yo so much @ivange94. I will be looking into your code!

1 Like

Thank you for the references @wyclif . We’ll check those.