-
Notifications
You must be signed in to change notification settings - Fork 614
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
Are mysql users out of luck when it comes to saving associations in bulk? #422
Comments
I'm not sure what you mean; this gem already has upsert support for MySQL (though I haven't used it myself). |
The options for MySQL are not great. After importing, you could possibly query based on a column like |
I'm going to close this issue. My only other suggestion would be to try StackOverflow for ideas retrieving previously inserted IDs. |
Guessing the situation here hasn't changed? If a MySQL user wants to bulk import models along with their has_many association(s), they can't use this Gem, correct? Well I mean I can still use it, but I have to be willing to set the associations later after bulk importing the models, totally eliminating the benefit of the bulk import, right? |
As far as I know MySQL still doesn't offer a way to return all the IDs of the inserted rows. It's hard to say if that eliminates the benefit of bulk import for you or not. If you can possibly reduce the number of inserts executed, you will likely see some improved performance. If you are using auto increment primary keys and the MySQL setting |
No description provided.
The text was updated successfully, but these errors were encountered: