Ensure that adapter is refreshed if entity types have been changed.

Change-Id: I3d2ff3256d7de306afb51f70b1760cdd6bc80f9a