Well, of course not. When you remove the default you have to explicitly list each Item you want to save to persistence.
You don’t because there is no concept of “exceptions”. Like I said above, the strategies are additive. *
applies to all Items whether they are listed elsewhere in the persistence config or not.
So your choices are:
-
Make
*
the minimum strategy possible (restoreOnStartup) and then you need to list each of your Items separately with the strategy desired. You can use Design Pattern: Group Based Persistence to make that a little less work. Though if your minimum strategy is only restoreOnStartup you should probably just exclude the*
line entirely and add restoreOnStartup to the other lines because restoreOnStartup doesn’t make sense if you don’t also have a strategy to save that Item too. -
Make default strategy be
everyUpdate
which will capture the changes too without the double entries. You’ll have to live with the fact that some of your Items will save more data than necessary (not every Item will receive updates when there is no change so it probably won’t be a lot of entries). -
Live with the double entries.