Skip to content
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

missing ids list in Import::Result #1

Open
jankmet opened this issue Jun 12, 2018 · 2 comments
Open

missing ids list in Import::Result #1

jankmet opened this issue Jun 12, 2018 · 2 comments
Assignees

Comments

@jankmet
Copy link

jankmet commented Jun 12, 2018

ActiveRecord::Import::Result.new([], number_of_inserts, [], [])

@keeguon keeguon self-assigned this Aug 28, 2018
@keeguon
Copy link
Owner

keeguon commented Aug 28, 2018

@jankmet I'll try to take a look at this in September but unsure SQL Server can easily return created ids.

@ZeroFries
Copy link

ActiveRecord::Import (the base gem, used with postgres) also populates the ID field on imported records.

Eg:

new_model = Model.new(attrs)
Model.import new_model
new_model.id => 3

In SQL Server, the last line will output nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants