Applied the update in the method update() so that models that are not persisted in a list can be automatically persisted.