-
Notifications
You must be signed in to change notification settings - Fork 51
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
Primary key not returned when upserting specific attributes #79
Comments
Hi! Thanks for reporting this! I'm trying to reproduce this using a unit test, but it's going nowhere. See this commit: 3c28213 I expected it to (mis)behave the same way, but I can't reproduce the behavior. Maybe there's something else about your User record or how the db table was setup that causes the problem? Or maybe there's some kind of version incompatilibility with Rails? |
@jesjos Just left a comment 3c28213#r30519950 |
@jesjos I'll pull down the code and check out that test. Will get back to you. |
@jesjos Ok, so I wasn't able to get that test to fail either, which got me curious. I tried upgrading my app to Rails 5.2 from 5.1.6 and the issue went away. So this issue is specific to Rails 5.1. Now I'm trying to run the test suite for What are your thoughts? |
I’m not in a position to try anything out right now, but I can try later today. It seems the travis builds aren’t building the correct rails versions. I need to take a look at that as well. I’ll get back to you. |
Can confirm our travis build matrix has not been working as intended, all tests have run on rails 5.2 :( Seeing a lot of errors. Guess we'll have to start fixing them. |
@jesjos Gotcha. Yeah I ran manually by changing |
Yeah, the way I do it is I use an environment variable: $ BUNDLE_GEMFILE=Gemfile.rails-5-1 bundle install
$ BUNDLE_GEMFILE=Gemfile.rails-5-1 bundle exec rspec |
Working on this here: #79 I've got most tests working, some left. |
Closed in #82 |
@jesjos Thanks for resolving this! And thank you @jesjos @olleolleolle for maintaining this library. It's been critical for my project and is a much needed piece in the Ruby/Rails ecosystem. |
This issue was introduced when I upgraded from 0.9.1 to 0.9.3. See the example below
user.id
isnil
in the final object. Again, this code works fine in v0.9.1 but not 0.9.3.The text was updated successfully, but these errors were encountered: