| Assuming this refers to a TODO I wrote originally, then this about the fact that we always define a field for storing the tenant id in the index mapping, also if that index never-ever is used with multi-tenancy. Back then I didn't see a way to detect whether multi-tenancy may be used or not (naturally, the specific id is only available within a session), but indeed it should be doable via sessionFactory.getSessionFactoryOptions().getMultiTenancyStrategy(). So we shouldn't need another option, but rather add that field to the mapping or not based on the current multi-tenancy strategy obtained from the session factory. |