You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When bulk-inserting via Querier.InsertMulti the primary key field on the structs are not updated with the key it was assigned after inserting. This seems on purpose since a comment on the method notes this behavior. This makes it difficult to use, especially if you plan to assign those IDs to foreign-key fields of another set of structs to bulk-insert. I'm open to attempting to add this functionality, but wanted to first see if there's a specific reason why this was excluded or cannot be done.
Describe the solution you'd like
The structs have their primary key field populated after bulk-inserting.
Describe alternatives you've considered
None yet.
The text was updated successfully, but these errors were encountered:
wanted to first see if there's a specific reason why this was excluded or cannot be done
That's because I don't know how to implement that functionality with databases and drivers that use LastInsertId() (like MySQL) and don't want to implement only for some databases/drivers (like PostgreSQL), but not others.
Is your feature request related to a problem? Please describe.
When bulk-inserting via
Querier.InsertMulti
the primary key field on the structs are not updated with the key it was assigned after inserting. This seems on purpose since a comment on the method notes this behavior. This makes it difficult to use, especially if you plan to assign those IDs to foreign-key fields of another set of structs to bulk-insert. I'm open to attempting to add this functionality, but wanted to first see if there's a specific reason why this was excluded or cannot be done.Describe the solution you'd like
The structs have their primary key field populated after bulk-inserting.
Describe alternatives you've considered
None yet.
The text was updated successfully, but these errors were encountered: