update model for owned memory relationship and add unit test for it