modler
modler copied to clipboard
cache loaded reference model
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").
-
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.
-
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.