-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Something we enjoyed in Octopus was the seamless AR associations once you made it into the shard.
For example, this worked for us:
new_account = Account.using_shard(:mysql_group, :shard1).first
expect(new_account.users.first).to be == new_userHowever, with rails-sharding, the shard has to be specified like this:
new_account = Account.using_shard(:mysql_group, :shard1).first
# See the using_shard(:mysql_group, :shard1) call on the users collection
expect(new_account.users.using_shard(:mysql_group, :shard1).first).to be == new_userWould it be hard to improve this logic and "tag" the users AR relation with the currently used shard, so the explicit using_shard(:mysql_group, :shard1) would not be needed?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels