|
Re: Eclipse Link tenant property lost on cascading delete [message #1002750 is a reply to message #1002619] |
Sat, 19 January 2013 09:36 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Donat,
I don't really know the answer to this one. I think it is better to ask this on the eclipselink forum/newsgroup.
gr. Martin
On 01/19/2013 01:26 AM, Donat Mueller wrote:
> 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:
>
> ArrayRecord(
> model_ValueContainer.dbId => 1
> model_ValueContainer.TENANT_ID => null
> model_ValueContainer.externalId => 1
> model_ValueContainer.name => Realestate
> model_ValueContainer.state => 0
> model_ValueContainer.template => null
> model_ValueContainer.type => Domain)
>
> 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.
>
> 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 ?
>
> Any ideas/help appreciated
> Donat
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03287 seconds