cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Can I specify join type for relationships in the model?
Date Tue, 25 Oct 2011 12:03:14 GMT
I don't think we had a discussion. We can have it now.

In this particular case my thinking is that relationship itself does not have any particular
"join semantics"... It is always a match between two keys. If you just need to find objects
related to a given object, using outer join never makes sense. Where it does make sense is
in qualifiers. But this makes it a property of a qualifier, not the relationship.

In generally it is often hard to find such single place for many ORM properties. There's always
a concern that anything beyond basic DB mapping is really a property of the execution context
(e.g. it is different per-application, per-session, per-query, etc. - a good example is entity
callbacks/listeners adding behavior to the mapping). So this often becomes a question of whether
"one size fits all".

Andrus


On Oct 25, 2011, at 2:40 PM, Hugi Thordarson wrote:
> Thank you Andrus.
> Has there ever been discussion of adding the ability to specify join types when modeling
relationships, or would that be at odds with design intentions? It seems like a useful feature.
> 
> Cheers,
> - hugi
> 
> 
> 
> On 25.10.2011, at 11:23, Andrus Adamchik wrote:
> 
>> Yes, in Cayenne join type is a property of a path in expression or query, not a relationship.
This is by design.
>> 
>> Andrus
>> 
>> On Oct 25, 2011, at 1:54 PM, Hugi Thordarson wrote:
>> 
>>> Good morning all.
>>> 
>>> The subject says it all, really: Cayenne seems to default to inner joins for
relationships. Is it possible for me to set the join type for relationships in the model,
so I don't have to specify the join type for every query? (I always want outer joins)
>>> 
>>> Cheers,
>>> - hugi
>> 
> 
> 


Mime
View raw message