gamechanger/monufacture

Fragments update their parents

Closed this issue · 0 comments

with factory('game_account_edits', db.data.game_account_edits):
    fragment('stat_edit', {})

    fragment('player_stat_edit', {
        'type': 'player_stat',
        'player_id': helpers.id_of('player'),
    }, parent='stat_edit')

    fragment('team_stat_edit', {
        'type': 'team_stat',
        'team_id': helpers.id_of('team'),
    }, parent='stat_edit')

    default({
        'player_edit': embed('player_stat_edit'),
        'team_edit': embed('team_stat_edit')
    })

game_account_edits = create('game_account_edits')
'player_id' in game_account_edits['team_edit'] #  True