parameters: (self, *args, **kwargs)
return_statement: return query.options(selectin_polymorphic(
              VulnerabilityGeneric,
              [Vulnerability, VulnerabilityWeb]
          ), *options)
docstring: Eager hostnames loading.
  
          This is too complex to get_joinedloads so I have to
          override the function
docstring_summary: Eager hostnames loading.
docstring_tokens: Eager hostnames loading .
function: def _get_eagerloaded_query(self, *args, **kwargs):
          """Eager hostnames loading.
  
          This is too complex to get_joinedloads so I have to
          override the function
          """
          query = super()._get_eagerloaded_query(
              *args, **kwargs)
          options = [
              joinedload(Vulnerability.host)
                  .load_only(Host.id)  # Only hostnames are needed
                  .joinedload(Host.hostnames),
  
              joinedload(Vulnerability.service)
                  .joinedload(Service.host)
                  .joinedload(Host.hostnames),
  
              joinedload(VulnerabilityWeb.service)
                  .joinedload(Service.host)
                  .joinedload(Host.hostnames),
              joinedload(VulnerabilityGeneric.update_user),
              undefer(VulnerabilityGeneric.creator_command_id),
              undefer(VulnerabilityGeneric.creator_command_tool),
              undefer(VulnerabilityGeneric.target_host_ip),
              undefer(VulnerabilityGeneric.target_host_os),
              joinedload(VulnerabilityGeneric.tags),
          ]
  
          if flask.request.args.get('get_evidence'):
              options.append(joinedload(VulnerabilityGeneric.evidence))
          else:
              options.append(noload(VulnerabilityGeneric.evidence))
  
          return query.options(selectin_polymorphic(
              VulnerabilityGeneric,
              [Vulnerability, VulnerabilityWeb]
          ), *options)
function_tokens: def _get_eagerloaded_query ( self , * args , * * kwargs ) : query = super ( ) . _get_eagerloaded_query ( * args , * * kwargs ) options = [ joinedload ( Vulnerability . host ) . load_only ( Host . id ) # Only hostnames are needed . joinedload ( Host . hostnames ) , joinedload ( Vulnerability . service ) . joinedload ( Service . host ) . joinedload ( Host . hostnames ) , joinedload ( VulnerabilityWeb . service ) . joinedload ( Service . host ) . joinedload ( Host . hostnames ) , joinedload ( VulnerabilityGeneric . update_user ) , undefer ( VulnerabilityGeneric . creator_command_id ) , undefer ( VulnerabilityGeneric . creator_command_tool ) , undefer ( VulnerabilityGeneric . target_host_ip ) , undefer ( VulnerabilityGeneric . target_host_os ) , joinedload ( VulnerabilityGeneric . tags ) , ] if flask . request . args . get ( 'get_evidence' ) : options . append ( joinedload ( VulnerabilityGeneric . evidence ) ) else : options . append ( noload ( VulnerabilityGeneric . evidence ) ) return query . options ( selectin_polymorphic ( VulnerabilityGeneric , [ Vulnerability , VulnerabilityWeb ] ) , * options )