Allow entityId property to be domain class and recursively resolve