Observed when using rdf-mongo for the repository adapter, Spira::Persistence#reload seems to result in multiple identical queries to the repository. (Once for each property on the model class?)
This change:
exits early if the query response is nil
otherwise reads all the statements from the query response once, preventing the duplicate queries to the repository
Coverage increased (+0.0006%) to 98.207% when pulling 0ea3454b9f475a7c19bfbafa26906e68486974bd on rwd:query-once-in-reload into 5cfaa9c5d226ee170020d767122cf86e8a62b723 on ruby-rdf:develop.
Coverage increased (+0.0006%) to 98.207% when pulling 0ea3454b9f475a7c19bfbafa26906e68486974bd on rwd:query-once-in-reload into 5cfaa9c5d226ee170020d767122cf86e8a62b723 on ruby-rdf:develop.
Observed when using rdf-mongo for the repository adapter,
Spira::Persistence#reload
seems to result in multiple identical queries to the repository. (Once for each property on the model class?)This change:
nil