1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/fixtures
Ryuta Kamizono 6187b7138c Fix rewhere to truly overwrite collided where clause by new where clause
```ruby
steve = Person.find_by(name: "Steve")
david = Author.find_by(name: "David")

relation = Essay.where(writer: steve)

# Before
relation.rewhere(writer: david).to_a # => []

# After
relation.rewhere(writer: david).to_a # => [david]
```

For now `rewhere` only works for truly column names, doesn't work for
alias attributes, nested conditions, associations.

To fix that, need to build new where clause first, and then get
attribute names from new where clause.
2020-05-05 11:45:29 +09:00
..
admin
all
categories
naked/yml
reserved_words
to_be_linked
accounts.yml
author_addresses.yml
author_favorites.yml
authors.yml
bad_posts.yml
binaries.yml
books.yml Allow AR::Enum definitions with boolean values 2019-12-24 07:05:42 -10:00
bulbs.yml
cars.yml
categories.yml
categories_ordered.yml
categories_posts.yml
categorizations.yml
citations.yml Lazy checking whether or not values in IN clause are boundable 2018-10-24 11:26:49 +09:00
clubs.yml
collections.yml
colleges.yml
comments.yml
companies.yml
computers.yml
content.yml
content_positions.yml
courses.yml
customers.yml Fix expanding an array of composed_of objects which have multiple mappings 2018-01-29 09:24:14 +09:00
dashboards.yml
dead_parrots.yml
developers.yml
developers_projects.yml
dog_lovers.yml
dogs.yml
doubloons.yml
edges.yml
entrants.yml
essays.yml Fix rewhere to truly overwrite collided where clause by new where clause 2020-05-05 11:45:29 +09:00
faces.yml
fk_test_has_fk.yml
fk_test_has_pk.yml
friendships.yml
funny_jokes.yml
interests.yml
items.yml
jobs.yml
legacy_things.yml
live_parrots.yml
mateys.yml
member_details.yml
member_types.yml
members.yml
memberships.yml Ensure to calculate column aliases after all table aliases are constructed 2018-06-19 22:21:51 +09:00
men.yml
minimalistics.yml Bring back ability to insert zero value on primary key for fixtures (#31795) 2018-01-26 12:42:28 +09:00
minivans.yml
mixed_case_monkeys.yml
mixins.yml
movies.yml
nodes.yml
organizations.yml
other_books.yml Allow specify fixtures to be ignored 2019-07-27 16:40:16 +08:00
other_comments.yml
other_dogs.yml
other_posts.yml
other_topics.yml
owners.yml
parrots.yml Allow specify fixtures to be ignored 2019-07-27 16:40:16 +08:00
parrots_pirates.yml
people.yml
peoples_treasures.yml
pets.yml
pirates.yml
posts.yml Test actual query and result 2020-05-04 21:55:27 +09:00
price_estimates.yml
products.yml
projects.yml
randomly_named_a9.yml
ratings.yml
readers.yml
references.yml
ships.yml
speedometers.yml
sponsors.yml Can preload associations through polymorphic associations 2018-04-20 17:28:25 -04:00
string_key_objects.yml
subscribers.yml
subscriptions.yml
taggings.yml
tags.yml
tasks.yml Fix docs to replace http with https in activerecord [ci skip] 2019-08-26 22:34:33 +09:00
topics.yml
toys.yml
traffic_lights.yml
treasures.yml
trees.yml
uuid_children.yml
uuid_parents.yml
variants.yml
vegetables.yml
vertices.yml
warehouse-things.yml
zines.yml