No announcement yet.

An ORM for Mirth?

  • Filter
  • Time
  • Show
Clear All
new posts

  • An ORM for Mirth?

    Hi there!

    Mirth allows us to open a connection to a database and perfect raw SQL commands on that connection, through use of the Java class DatabaseConnection.

    However, for complex queries, using SQL to accomplish this can be a major pain. A more modular approach is better than a single, multi-join/update/select SQL command.

    It is for this reason that I seek to implement a JS ORM into my Mirth channels.

    Is that possible? Perhaps I could drop the entire source code of a Mirth-compatible-ORM into a code template and call that template from the channel?
    (This is how I'm able to use moment.js in my channels)
    If this is possible, could you provide an example of an ORM that would work with Mirth?

    A pre-emptive thanks for the help/suggestions!
    Last edited by bittelc; 07-28-2016, 10:46 AM.

  • #2
    Mirth Connect actually leverages myBatis as a mapper, and we started using it from within the channels themselves to make things like cache management, credential management, and mapping easier. Generally speaking, we pass a lot of HashMaps back and forth rather than doing actual ORM, but if you care to create Java interfaces for your channel domain objects, then you would not be limited to maps and primitives.