update encrypted store to direct relationships and use join tables. Also fix inheritance to make sure it scopes queries to the correct entity type.