One more thing, I tested on mysql and it was fine, but the other db i
am using does not like the sql like:
SELECT * FROM "TRIP PASSENGERS"
WHERE (("KID - DATE", "KID - TIME", "KID - USER", "KID - MULT", "KID
- COMM")) IN ((39350,764,4,0,17),(39829,10,20,3,4))
it prefers
SELECT * FROM "TRIP PASSENGERS"
WHERE "KID - DATE" IN (39350,39829) and
"KID - TIME" IN (764,10) and
"KID - USER" IN (4,20) and
"KID - MULT" IN (0,3) and
"KID - COMM" IN (17,4)
is there a way to switch to that style somehow?
~ D
On Sep 18, 2:03 pm, Jeremy Evans <[email protected]> wrote:
> On Sep 18, 12:14 pm, daniel_spaniel <[email protected]> wrote:
>
> > Hi
> > I have been using eager_graph for a while, but after a while I
> > started to wonder if using eager would be faster, since I am not
> > really filtering on associated tables. By default eager things there
> > is a primary key called id.
> > But I have composite keys. With eager_graph, I use the
> > graph_only_conditions to set up the join association look up with my
> > composite keys. How do I do that with eager? I did not see an option
> > called eager_conditions.
>
> You have to create a custom :eager_loader to handle composite keys
> currently. Take a look at the Advanced Associations page (http://
> sequel.rubyforge.org/rdoc/files/doc/advanced_associations_rdoc.html),
> it has a composite key example (see the "Joining on multiple keys"
> section).
>
> Adding composite key support for the default associations is planned
> for the future, it'll probably make it into 3.6.0.
>
> Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---