Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » tenant property not found on cascading delete
tenant property not found on cascading delete [message #1002621] Fri, 18 January 2013 19:32 Go to previous message
Donat Mueller is currently offline 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:

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.
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 ?

Any ideas/help appreciated
Donat
  • Attachment: model.png
    (Size: 29.08KB, Downloaded 23 times)
 
Read Message
Read Message
Read Message
Previous Topic:JPA + Native interference
Next Topic:get sequence number through Eclipselink
Goto Forum:
  


Current Time: Fri May 24 16:40:56 EDT 2013

Powered by FUDForum. Page generated in 0.05527 seconds