-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.1.0 breaks with PostgreSQL tables that have json columns #506
Comments
this is related to #496 , we should merge this PR once the tests pass. |
leklund
added a commit
to leklund/acts-as-taggable-on
that referenced
this issue
Apr 4, 2014
updated specs for 'select distinct' and pg issues * new model/table with a json column for postgresql specific testing * add tests for explicit distinct in a select and for all queries to test if tagged_with adds a distinct clause on the query. http://github.com/mbleigh/acts-as-taggable-on/issues/357 * add tests for taggable_model_with_json * exclude test should sort the array result and expected array. PostgreSQL won't always return the two expected results in the expected order so the test failed intermittently. use group vs distinct when options[:any] is true update CHANGELOG check pg version and only use json if >=9.2
leklund
added a commit
to leklund/acts-as-taggable-on
that referenced
this issue
Apr 9, 2014
fix bug mbleigh#506 - .uniq breaks with pg and json columns updated specs for 'select distinct' and pg issues * new model/table with a json column for postgresql specific testing * add tests for explicit distinct in a select and for all queries to test if tagged_with adds a distinct clause on the query. http://github.com/mbleigh/acts-as-taggable-on/issues/357 * add tests for taggable_model_with_json * exclude test should sort the array result and expected array. PostgreSQL won't always return the two expected results in the expected order so the test failed intermittently. use group vs distinct when options[:any] is true update CHANGELOG check pg version and only use json if >=9.2 move change to master section
leklund
added a commit
to leklund/acts-as-taggable-on
that referenced
this issue
Apr 23, 2014
fix bug mbleigh#506 - .uniq breaks with pg and json columns updated specs for 'select distinct' and pg issues * new model/table with a json column for postgresql specific testing * add tests for explicit distinct in a select and for all queries to test if tagged_with adds a distinct clause on the query. http://github.com/mbleigh/acts-as-taggable-on/issues/357 * add tests for taggable_model_with_json * exclude test should sort the array result and expected array. PostgreSQL won't always return the two expected results in the expected order so the test failed intermittently. use group vs distinct when options[:any] is true update CHANGELOG check pg version and only use json if >=9.2 move change to master section
leklund
added a commit
to leklund/acts-as-taggable-on
that referenced
this issue
Apr 23, 2014
fix bug mbleigh#506 - .uniq breaks with pg and json columns updated specs for 'select distinct' and pg issues * new model/table with a json column for postgresql specific testing * add tests for explicit distinct in a select and for all queries to test if tagged_with adds a distinct clause on the query. http://github.com/mbleigh/acts-as-taggable-on/issues/357 * add tests for taggable_model_with_json * exclude test should sort the array result and expected array. PostgreSQL won't always return the two expected results in the expected order so the test failed intermittently. use group vs distinct when options[:any] is true update CHANGELOG check pg version and only use json if >=9.2 move change to master section move table with json to spec/internal/db/schema.rb
tekniklr
pushed a commit
to tekniklr/acts-as-taggable-on
that referenced
this issue
Mar 19, 2021
fix bug mbleigh#506 - .uniq breaks with pg and json columns updated specs for 'select distinct' and pg issues * new model/table with a json column for postgresql specific testing * add tests for explicit distinct in a select and for all queries to test if tagged_with adds a distinct clause on the query. http://github.com/mbleigh/acts-as-taggable-on/issues/357 * add tests for taggable_model_with_json * exclude test should sort the array result and expected array. PostgreSQL won't always return the two expected results in the expected order so the test failed intermittently. use group vs distinct when options[:any] is true update CHANGELOG check pg version and only use json if >=9.2 move change to master section move table with json to spec/internal/db/schema.rb
tekniklr
pushed a commit
to tekniklr/acts-as-taggable-on
that referenced
this issue
Mar 19, 2021
…pg_and_json Leklund fix distinct for pg and json fixes mbleigh#506
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup: vanilla Rails 4.0.4 app using PostgreSQL 9.3. The 3.1.0 release breaks when using tagged_with on a model that utilizes a json column.
The
tagged_with
method is calling.uniq
on every request and that in turn generates a query with a distinct table.* which breaks with json columns. See this pull request for a possible solution: #496migration:
the model
the error in action:
The text was updated successfully, but these errors were encountered: