Re: [Rails-core] smart eager loading and caching

2014-05-19 Thread Yves Senn
I agree with Matt on this subject. Even if we could come up with useful heuristics, we would not deprecate includes, eager_load and preload. There are always situations you can't detect. Also I wouldn't want to use that feature on some of my apps. It can be crucial what Query is executed and

Re: [Rails-core] smart eager loading and caching

2014-05-18 Thread Matt Jones
On May 16, 2014, at 2:35 PM, Lawrence Wu lawre...@lawrencewu.me wrote: I'd like to deprecate methods like includes and eager_load in Rails since I think it is possible to automatically detect when they are needed. Ideally the developer could know very little about how databases work and

[Rails-core] smart eager loading and caching

2014-05-17 Thread Lawrence Wu
I'd like to deprecate methods like includes and eager_load in Rails since I think it is possible to automatically detect when they are needed. Ideally the developer could know very little about how databases work and still get very efficient queries using just the ORM. What do other people

Re: [Rails-core] smart eager loading and caching

2014-05-17 Thread richard schneeman
There's a ton of magic in active record as is. If you have ideas on a big change like the one you are suggesting, you should fork active record and get it working to get feedback. After that it's worth discussing. If you really want to help here, take a look at open issues tagged with active