modler icon indicating copy to clipboard operation
modler copied to clipboard

cache loaded reference model

Open peterdenev opened this issue 9 years ago • 1 comments

HI,

Interesting idea. What do you think of:

  • cache the result from relation in "values". For example when relation marked as "get once", if you call "otherModel" you will only one sql request. And check for prefix or suffix to force load (example: "ForceRelateMe")
  • valdidate var type (not only "is required").

peterdenev avatar May 21 '15 13:05 peterdenev

  1. I could definitely see the caching being useful, especially given that it has to make a new instance of the requested model/collection each time it needs the relation. :+1: on that.

  2. I've been meaning to do the type validation for a while (that's the reason that property even exists). Just one of those things I haven't gotten around to :) so... :+1: on that too.

enygma avatar May 21 '15 13:05 enygma