Setup
The following database structure is used.
Card
table has nested Effects
table with heal
and damage
fields
The objective
We want to add calculated int field totalHeal
to Card
table.
totalHeal
is calculated by iterating all nested rows and adding a heal
field value
and subtracting damage
field value