Stefan W Tue Jun 29 10:13:29 -0400 2010

Subject: Automatically Joined Tables

Hi,

Firstly thanks for the great ORM. I've tried a lot of the non-framework-specific ones and this one has worked best for me by a long way.

I was just wondering what the official solution to automatically joined records was -

e.g. I have a stats table and an articles table. I want to use SQL to order the articles based on the values contained within the stats table (most popular etc.). In general I can just pass in a join when I do the find but I always want the same join to occur when the article is loaded so ideally I'd like to just put something into the model to have the stats appear to the rest of the system as a part of the articles table.

Does something exist to achieve this?

Regards,

Stefan


Kien La Fri Jul 02 09:57:56 -0400 2010

I'd probably just create a method on your model that does the join and ordering for you.

(1-1/1)