A lightweight but powerful entity manager