On Wednesday, Oct 1, 2003, at 18:01 Europe/Rome, Scott Finnerty wrote:
> [...]
> That said, here are some musings -
>
> There is an EXISTS expression type - if this were used as the type in
> an
> unary expression with a SelectQuery as the operand - should this
> translate
> to SELECT ... FROM T1 ... WHERE ... EXISTS (SELECT ... FROM T2 ...
> WHERE
> ....)?
>
> If the EXISTS expression type was used in conjunction with an object
> path
> that is a relationship in a unary expression, should it translate into:
>
> SELECT ... FROM T1, T2 ... WHERE .... AND T1.PK = T2.PK
This is the correct SQL statement for an exists expression when ever
the object path is composed of all to-one relationship, even if more
than one.
> For a to-one relationship? And:
>
> SELECT ... FROM T1 .... WHERE .... EXISTS (SELECT ... FROM T2 ... WHERE
> T2.PK = T1.FK)
>
> For a to-many relationship?
This is needed as soon as the object path contains a to-many
relationship.
> If I'm way off base and should leave the heavy lifting to the big boys
> - let
> me know... ;-)
No; it sounds quite right! ;-]
I think it would be excellent to start all this discussion writing down
a few test cases that describe exactly the problem we are trying to
solve, how we want to write the application code to use express these
feature, and then add the code to Cayenne until all the new tests pass.
I have tried to look for Cayenne and DBUnit, but did not find anything
relevant.
Is there anybody doing any work to integrate Cayenne with a DB testing
framework like DBUnit or something like that?
Giulio Cesare Solaroli
This archive was generated by hypermail 2.0.0 : Wed Oct 01 2003 - 12:51:51 EDT