All,
We’d like to be able to select records from a table where we use an Expression
in a SelectQuery for most attributes, but then we want to limit the query to an
IN or EXISTS qualifier as well. We’d rather not bring all the objects back
just so we can do the query, so we’d like to add someth
Sorry that was maybe a bit cryptic, here's working code (from Cay 3.1.1) as
per your imaginary case:
class Company extends _Company
{
public List getEmployees()
{
ObjRelationship rel = (ObjRelationship) Cayenne.getObjEntity(
getObjectContext().newObject( Emloyee.class ) )
How about something like:
ObjRelationship rel = Cayenne.getObjEntity( employee ).getAnyRelationship(
company ).getReverseRelationship();
Jurgen
-Original Message-
From: Maik Musall
Sent: Monday, March 19, 2018 3:41 PM
To: user@cayenne.apache.org
Subject: Re: Fetching a to-many DbRe
I have cases of this like a reference to the user that created an object. Over
the years, those become millions of objects, so if the application would
somehow stumble upon the back-relationship and try to resolve 1:n with millions
of objects, it would stall for a while, crossing the threshold t
I wouldn't think having company->>employees modeled would cause a
performance issue. Did you try it first and then remove it?
On Mon, Mar 19, 2018 at 8:39 AM, Hugi Thordarson wrote:
> No, I only have a DbRelationship so no code gets generated. The
> ObjRelationship is only modeled in one direc
No, I only have a DbRelationship so no code gets generated. The ObjRelationship
is only modeled in one direction for performance reasons.
Imagine a relationship Company <->> Employees where both DbRelationships
are modeled but only "Emploee" has a "company" relationship, "Company" has no
"e
Hi Hugi,
Do you mean something like lineItem.getOrders(); ?
On Mon, Mar 19, 2018 at 7:06 AM, Hugi Thordarson wrote:
> Hi all,
> I feel like this is something I should know so I'm almost hesitant to ask.
> But…
>
> I have a DataObject - how do I read the value of a ToMany DbRelationship
> it ha
Hi all,
I feel like this is something I should know so I'm almost hesitant to ask. But…
I have a DataObject - how do I read the value of a ToMany DbRelationship it has?
Cheers,
- hugi