Derivation is not available in the database

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:

This page was edited 69 days ago on 02/10/2024. What links here