Add QueryRelated to orm struct.