Donat Mueller Messages: 10 Registered: January 2013 Location: switzerland
Junior Member
Hi,
I have set up a multy tenancy orm mapping.
Inserting works fine but when I try to delete a record that was read before I get an exception No value was provided for the session property [eclipselink.tenant-id].
I did not model the tenantid in my pojo's. So the translationRow does not contain tenancy information:
ParameterExpression on line 265 gets null for the field: eclipselink.tenant-id
value = session.getProperty(getField().getName());
I have set the properties on creation of the entity manager.
Code: [Select all] [Show/ hide]
Long tenant = getTenantsForUser("testuser").get(0);
Map<String, Object> emProperties = new HashMap<String, Object>();
emProperties.put("eclipselink.tenant-id", tenant);
EntityManager entityManager = emf.createEntityManager(emProperties);
Should I configure sessions.xml to get this to work ?