toucan icon indicating copy to clipboard operation
toucan copied to clipboard

Should atoms in toucan.hydrate flushed after defmodel?

Open DogLooksGood opened this issue 7 years ago • 2 comments

When we change models, we may change hydration-keys, this change will not work unless we reload toucan.hydrate namespace. This looks inconvenient in development.

Since automagic-batched-hydration-key->model and automagic-batched-hydration-keys are delays, why not reload them after each time we call defmodel? maybe there's a better way for this?

DogLooksGood avatar Mar 29 '18 17:03 DogLooksGood

PR #27 is close to what you want.

I'm hoping to get some tests in that PR so we can merge it in the near future

camsaul avatar May 16 '18 01:05 camsaul

It is inconvenient but I think maybe doing (require 'toucan.hydrate :reload) in the REPL will at least let you continue working

camsaul avatar May 16 '18 02:05 camsaul