@classmethod<EOL><INDENT>def _one_to_many_query(cls, query_obj, search4, model_attrib):<DEDENT>
model = model_attrib.parent.class_<EOL>if isinstance(search4, str):<EOL><INDENT>query_obj = query_obj.join(model).filter(model_attrib.like(search4))<EOL><DEDENT>elif isinstance(search4, int):<EOL><INDENT>query_obj = query_obj.join(model).filter(model_attrib == search4)<EOL><DEDENT>elif isinstance(search4, Iterable):<EOL><INDENT>query_obj = query_obj.join(model).filter(model_attrib.in_(search4))<EOL><DEDENT>return query_obj<EOL>
extends and returns a SQLAlchemy query object to allow one-to-many queries

        :param query_obj: SQL Alchemy query object
        :param str search4: search string
        :param model_attrib: attribute in model