Adam, I believe the the eager loader is only available in Edge (and has been
changed quite a lot recently). I believe (but might be wrong) that
2.0.2still uses the older join process.

-Matt

On 3/6/08, Adam Grant <[EMAIL PROTECTED]> wrote:
>
> Rails 2.0 is pretty solid. With Sexy Migrations and Foxy Fixtures, its
> alot smoother rollin'.
>
> And the migrations don't have any effect on your app. They are just
> helpers for creating the database, and as such, you can drop them completely
> and do all your DB stuff by hand, no worries.
>
> One thing to take note of in 2.0 is that the ActiveRecord::Base.findmethod's 
> :include option now automatically does preloading, so instead of
> LEFT JOIN-ing on your associations:
>
> User.find(:all, :include => :company)      #=>      "SELECT * FROM users
> LEFT JOIN companies ON companies.id = users.company_id"
>
> it will create a second SQL statement:
>
> "SELECT * FROM users"
> "SELECT * FROM companies WHERE (id = 5))"
>
> This was added for performance improvements on huge joins, but you
> probably won't notice a difference for smaller queries. This really threw me
> for a loop when my :conditions weren't being implemented as I had hoped.
> Just a heads up.
>
> PS: does anyone know how to turn preloading off?
>
>
>
> On Thu, Mar 6, 2008 at 11:07 AM, liquid_rails <[EMAIL PROTECTED]>
> wrote:
>
> >
> > I like to create my tables in MySQL, and not through Rails.  I am
> > hoping that I will still be able to get everything to work with this
> > approach in Rails 2.0.
> >
> > On Mar 6, 10:47 am, Cliff Rhyne <[EMAIL PROTECTED]> wrote:
> > > I will admit that I didn't like the changes in the scaffold
> > > initially.  However, now that I've gotten my feet wet I think that it
> > > was a good move.  It moved everything in migration scripts and out of
> > > a create.sql file.  You can create scaffolds entirely via one command
> > > (although it can be on the long side).
> > >
> > > I have mixed feelings about some of the changes to the views, but
> > > overall I think they are better.  It's not so much that they are bad,
> > > but I need to learn more about them.
> > >
> > > On Mar 6, 10:27 am, tommy <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > > Yeah, do it!
> > >
> > > > There are some big improvements and it does not take long to convert
> > > > it over.
> > >
> > > > scaffolding works a lot better now, it generates REST style MVCs
> > now.
> > >
> > > > There is a performance upgrade too with mysql query caching support.
> > >
> > > > Google for the rake deprecated task. it will help.
> > >
> > > > tommy
> > >
> > > > On Mar 6, 10:18 am, liquid_rails <[EMAIL PROTECTED]> wrote:
> > >
> > > > > Has anyone made the switch over to Rails 2.0 yet?  If so, I'd be
> > > > > interested in hearing your thoughts about it.  One difference that
> > I
> > > > > know of is that scaffolding a la Rails 1.* no longer works...-
> > Hide quoted text -
> > >
> > > - Show quoted text -
> >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to