Fixed bug with nested Id fields not being persisted