-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
ObjectRepository object id #102
Comments
Here you go - NitriteIdAsIdTest |
Thanks i will do that. while i was playing around i tried adding a variable called _id to the object to test what happens and it mapped the id correctly . would this be a bad idea to use ? |
I'll suggest not to depend on database internals. If some day the default id key is changed to something else say $id, then your code will break after upgrading nitrite verson. |
Ok thanks, will the method you are using not cause a performance issue though as you are generating an id twice ? i could be inserting thousands of rows at times. |
I am not generating id twice, just reusing what is there in collection. There would not be any performance impact as far as I think, though you can confirm it by creating a stress test yourself. |
there was a slight drop but its negligible when inserting 10000 records it took 14.1 seconds and with the addition it took 15.5 seconds. these were quite big reccords |
Hi, when using an ObjectRepository with a mapped object how can i get the NitriteId for an object. i have checked the documentation and can only find an example of getting the id from a Document not a Object.
The text was updated successfully, but these errors were encountered: