Re: Multi Tenancy : find fails with a NPE on DN 2.5.6


passignat@...
 
Edited

Miss read the doc. TenantProvider need to be an object in the EntityManager setting.

Map map = new HashMap();
map.put(PropertyNames.PROPERTY_MAPPING_TENANT_PROVIDER, new MyTenantProvider());
final EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("APP_UNIT", map);

So far TenantProvider works with JPA, remains to understand why TenantReadIds on the EntityManger doesn't...
--
Stephane

Join {main@datanucleus.groups.io to automatically receive all group messages.