cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Attempting to implement a "MATCH ALL VALUES" expression at the application level.
Date Tue, 18 Apr 2006 10:13:45 GMT

On Apr 18, 2006, at 1:53 AM, Mike Kienenberger wrote:

> select l1.* from letters l1, letters_digits ld1, digits d1, letters
> l2, letters_digits ld1, digits d2 where
>
> d1.value = '1' and ld1.digit_id = d1.digit_id and ld1.letter_id =  
> l1.letter_id
> and
> d2.value = '2' and ld2.digit_id = d2.digit_id and ld2.letter_id =  
> l2.letter_id


The current limitation is due to the fact that Cayenne qualifier  
translator removes "duplicate" joins.

If you want to take a shot at it and create a patch for the next  
major release, you'd have to introduce the "split" expression  
semantics as discussed in those messages that you've mentioned. Maybe  
use a pipe symbol at a place in the path where a split should start,  
like "|r1" or "r1.r2.|r3"??  Second thing to change is  
QueryAsembler.dbRelationshipAdded(..) method that removes  
"duplicates" to support the splits.

There are a few more things to take care of to fully support splits,  
so this is certainly not a trivial change.

I guess even if for now you stick with an in-memory solution or a  
SQLTemplate, the issue is worth putting on the "AFTER 1.2" Road Map.

Andrus


Mime
View raw message