techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.73k stars 482 forks source link

Record protos #862

Closed Smolations closed 2 years ago

Smolations commented 3 years ago

As I was combing examples to figure out how to do stuff, I saw that the loki-continuum.js example includes db options which set an object prototype wrapper (e.g. Fund and dbOptions.funds = { proto: Fund }). However, there is no documentation on how this is to work, exactly. I assumed that all db objects would be instantiated versions, but maybe it only works when adding records? I was just trying to fetch the objects in a collection using this method but none of the new fields i added (not included in original data) were present on the returned objects, leading me to believe that find queries don't automatically instantiate the proto wrapper. Is this the case @techfort ?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Smolations commented 3 years ago

Leave this issue alone, stale bot, you necessary but annoying lil thing. Let's keep this going to see how long @techfort intends to ignore it. 😏

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Smolations commented 3 years ago

You will never win, @stalebot. You cannot shake my resolve.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.