Sha256: 66175cf890f57450f8322b54b3fe0bac26ec6be589cd1f5e6922535489b31cf1

Contents?: true

Size: 684 Bytes

Versions: 1

Compression:

Stored size: 684 Bytes

Contents

1.4.6 -> 1.5.0:

Major change in this version of DbCharmer is association preload support. For example,
let's say we have a schema:

    class Post < ActiveRecord::Base
      belongs_to :user
    end

    class User < ActiveRecord::Base
      has_many :posts
    end

Now, if we have the following call in our code:

    User.on_db(:foo).all(:include => :posts)

In 1.4.6 it would load the users from connection :foo and posts from the
default connection, which is not what we would expect from this line of code.
So, starting 1.5.0 all finder calls on models having :include parameter would
switch associated models' connections to the same connection as the main model
in the call.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
db-charmer-1.5.0 CHANGES