[#19] Store linked entities

(currently, only nested entities were being stored)