Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA Relationship + Multi-Tenancy
JPA Relationship + Multi-Tenancy [message #726218] Fri, 16 September 2011 20:13 Go to next message
Jonathan is currently offline JonathanFriend
Messages: 8
Registered: July 2009
Junior Member
I'm not sure whether I've run into a bug with eclipse link's tenant discriminator or if I'm modeling my entities incorrectly.

Currently our database schema is setup to use relationship tables to model a relationship from one table to another, the table type indicates the type of relationship. If I execute a query on the entire table (Select e from Relationship e) it works. However if I try and query on any field within (Select e from Relationship e where eclipse link complains about the TENANT_ID parameter not being set (I've verified it has been set and this particular exception arrises on a per query basis).

Here's a code example of what the entities look like:

public class User {
... some fields

public class Order {
...some fields

public class UserOrderRelationship {

private long id;

private User user;

private Order order;


Any chance someone could point me in the right direction?

Re: JPA Relationship + Multi-Tenancy [message #730514 is a reply to message #726218] Wed, 28 September 2011 14:32 Go to previous message
Guy Pelletier is currently offline Guy PelletierFriend
Messages: 19
Registered: July 2009
Junior Member
Can you post the exception? And the code you are executing that results in the exception being thrown?

Where is your TENANT_ID set?

Also, you may want to try the latest 2.3.1 nightly.
Previous Topic:JPA Relationship + Multi-Tenancy
Next Topic:(no subject)
Goto Forum:

Current Time: Thu Apr 15 23:19:02 GMT 2021

Powered by FUDForum. Page generated in 0.02353 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top