Sequel shorts: eager load association with limit

Eager loading (preloading) only a certain number of associated records is pretty hard in SQL. But Sequel has you covered, if you are using a compatible database (such as Postgres).

Advertisements

2 thoughts on “Sequel shorts: eager load association with limit

    • Yes it works fine, I am using it with Rails 4. There are some gems that don’t support it like Doorkeeper and Enumerize, although I have forks for both of these that have Sequel support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s