开发者

Plans for eager loading for ActiveRecord in Subsonic 3?

Just curious if there are plans for eager lo开发者_StackOverflow中文版ading using ActiveRecord in Subsonic 3. Is there a roadmap out there?

It seems like a pretty sweet library. Very similar to Rails but missing a few sweet spots.


There's a couple of ways to do this right now - the first is to create partial of the generated class and create a new constructor with a boolean flag for eager loading - or what might be better is to create a static factory method (Product.SingleEager(1)) that goes and loads what you need.

The second way is to tweak the T4 template to do this for you.

I don't have any plans to offer a config switch for this since its one of the more hotly debated issues - I'd rather put the power in your hands :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜