code: def find_by_example(self, crash, offset = None, limit = None):
          
  
          # Validate the parameters.
          if limit is not None and not limit:
              warnings.warn("CrashDAO.find_by_example() was set a limit of 0"
                            " results, returning without executing a query.")
              return []
  
          # Build the query.
          query = self._session.query(CrashDTO)
  
          # Order by row ID to get consistent results.
          # Also some database engines require ordering when using offsets.
          query = query.asc(CrashDTO.id)
  
          # Build a CrashDTO from the Crash object.
          dto = CrashDTO(crash)
  
          # Filter all the fields in the crashes table that are present in the
          # CrashDTO object and not set to None, except for the row ID.
          for name, column in compat.iteritems(CrashDTO.__dict__):
              if not name.startswith('__') and name not in ('id',
                                                            'signature',
                                                            'data'):
                  if isinstance(column, Column):
                      value = getattr(dto, name, None)
                      if value is not None:
                          query = query.filter(column == value)
  
          # Page the query.
          if offset:
              query = query.offset(offset)
          if limit:
              query = query.limit(limit)
  
          # Execute the SQL query and convert the results.
          try:
              return [dto.toCrash() for dto in query.all()]
          except NoResultFound:
              return []
docs: Find all crash dumps that have common properties with the crash dump
          provided.
  
          Results can be paged to avoid consuming too much memory if the database
          is large.
  
          @see: L{find}
  
          @type  crash: L{Crash}
          @param crash: Crash object to compare with. Fields set to C{None} are
              ignored, all other fields but the signature are used in the
              comparison.
  
              To search for signature instead use the L{find} method.
  
          @type  offset: int
          @param offset: (Optional) Skip the first I{offset} results.
  
          @type  limit: int
          @param limit: (Optional) Return at most I{limit} results.
  
          @rtype:  list(L{Crash})
          @return: List of similar crash dumps found.