Derivation is not available in the database
This page was created by Alexandra on 2018-11-28. Last edited by Edgar on 2025-01-20.

Derivation is a very good way to remove the need for repeating definitions.

Suppose you have this model:

An apartment has Occupants that may have pets of different breeds.

Suppose your logic calls for frequent subsets of information maybe like this:

3 different derivations on this model:

Apartment.TheDogs = self.Occupants.Pets->select(p|p.PetType.Breed='Dog')

Apartment.Grownups = self.Grownups->select(x|x.Age>=18)

Apartment.AreThereDogs = self.TheDogs->size>0

All is well and everyone is happy.

Until you want to do search in the database – when the OCL or Linq gets translated to Sql…

The problem is that the derivations are at the model level and are not available in persistent storage…

To remove the need for retyping the same definition again when you want to fetch in PS it would be much better to be able to use the derived association by having it translated into persistent members.

This is what we want to do:

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments