开发者

Plans for eager loading for ActiveRecord in Subsonic 3?

开发者 https://www.devze.com 2022-12-16 23:41 出处:网络
Just curious if there are plans for eager lo开发者_StackOverflow中文版ading using ActiveRecord in Subsonic 3.Is there a roadmap out there?

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

精彩评论

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