How to get IDs of object written in database via insert_range #1201
Unanswered
ivanKushnarenko
asked this question in
Q&A
Replies: 1 comment
-
This is a very good question. First of all it is not implemented yet. So all what we can do at the current moment is to brainstorm on how can it be done in the best way. My offer is to add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When inserting object in database I can get unique id od db table row to store this id in object directly, like this:
user.id = storage.insert(user);
I found it very useful cause I can have my object fully corresponding to data in db.
On the other hand, I cannot do anything like this when i use insert_range. My objects after writing to database do not have their real ids. Is there a workaround to make this possible? (Of course I do understand that I can write my own function to do what i want, but it seems to be frequent problem)
Beta Was this translation helpful? Give feedback.
All reactions