Welcome Guest, Not a member yet? Register   Sign In
Nesting queries within active record
#1

[eluser]E.T.Cook[/eluser]
Is there a method to create a nested results object with Active Record?

For example

Let's say I have two tables: one is cars, one is manufacturers

I would like the hierarchy to be as such:

[Ford]
[Taurus]
[F-150]
[Focus]
[Audi]
[A4]
[A6]
[A8]

etc...

Is there any way to do it without looping each query separately, and manually propagating an array? On the rails version of active record, I believe you use :through, but I can't seem to find anything like that here.

Thanks in advance for any help you can provide.


Messages In This Thread
Nesting queries within active record - by El Forum - 10-03-2008, 07:41 PM
Nesting queries within active record - by El Forum - 10-04-2008, 04:26 AM
Nesting queries within active record - by El Forum - 10-04-2008, 05:09 AM
Nesting queries within active record - by El Forum - 10-04-2008, 07:24 AM
Nesting queries within active record - by El Forum - 10-04-2008, 07:25 AM
Nesting queries within active record - by El Forum - 10-04-2008, 09:52 AM
Nesting queries within active record - by El Forum - 10-04-2008, 10:15 AM
Nesting queries within active record - by El Forum - 10-04-2008, 10:36 AM
Nesting queries within active record - by El Forum - 10-04-2008, 11:49 AM
Nesting queries within active record - by El Forum - 10-05-2008, 06:29 PM
Nesting queries within active record - by El Forum - 10-05-2008, 10:27 PM
Nesting queries within active record - by El Forum - 10-05-2008, 10:34 PM
Nesting queries within active record - by El Forum - 10-05-2008, 10:45 PM
Nesting queries within active record - by El Forum - 10-05-2008, 10:46 PM
Nesting queries within active record - by El Forum - 10-05-2008, 11:29 PM
Nesting queries within active record - by El Forum - 10-05-2008, 11:46 PM
Nesting queries within active record - by El Forum - 10-06-2008, 12:55 AM
Nesting queries within active record - by El Forum - 10-06-2008, 01:02 AM
Nesting queries within active record - by El Forum - 10-06-2008, 01:04 AM
Nesting queries within active record - by El Forum - 10-06-2008, 01:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB