Show/Hide Toolbars

TMS Aurelius Documentation

Navigation: » No topics above this level «

Multi-Model Design

Scroll Prev Top Next More

Most Aurelius applications uses single-model mapping. This means that all classes you map belongs to the same model. So for example when retrieving objects from the database, or creating the database structure, objects all mapped classes will be available.


But in some situations, you might need to have multiple mapping models. For example, you want your TCustomer entity class to belong to your default model, but you want TUserInfo entity class to belong to a different model ("Security" model for example). There are several reasons for this, for example:


You have more than one database you want to access from your application, with totally different structures

You have some objects that you don't want to save to a database, but just want to use them in memory (using SQLite memory database)

You use other tools that uses Aurelius and you want to logically separate your entity classes for that. For example, when using TMS XData, you might want to use different models to create different server setups.

Any other reason you have to separate your classes into different mappings.


There are two ways to define multiple mapping models: using Model attribute (preferrable), or manually creating a mapping setup. The following topics describe the two options and explain the concepts of multi-model design in Aurelius.


Multi-Model Step-By-Step

Using Model attribute


Mapping Setup