Report that two entities have the same id but could not be merged.

    Args:
      entity_id: The id of the entities.
      reason: A string giving a reason why they could not be merged.
345517
def _ReportSameIdButNotMerged(self, entity_id, reason):
    
    self.feed_merger.problem_reporter.SameIdButNotMerged(self,
                                                         entity_id,
                                                         reason)
1358267
def entityId(self, partial, channel=None):
        '''
        '''
        url = '{}/{}/meta/any'.format(self.url, _get_path(partial))
        data = self._get(_add_channel(url, channel))
        return data.json()['Id']
1268350
def _setID(self, id):
        
        if type(id) in (types.ListType, types.TupleType):
            try:
                for key in self._sqlPrimary:
                    value = id[0]
                    self.__dict__[key] = value
                    id = id[1:] # rest, go revursive
            except IndexError:
                raise 'Not enough id fields, required: %s' % len(self._sqlPrimary)
        elif len(self._sqlPrimary) <= 1:
            # It's a simple value
            key = self._sqlPrimary[0]
            self.__dict__[key] = id
        else:
            raise 'Not enough id fields, required: %s' % len(self._sqlPrimary)
        self._new = False
1045514
def _get_merged(self, tax_id):
        

        cmd = """
        SELECT COALESCE(
        (SELECT new_tax_id FROM {merged}
         WHERE old_tax_id = {x}), {x})
        """.format(x=self.placeholder, merged=self.merged)

        with self.engine.connect() as con:
            result = con.execute(cmd, (tax_id, tax_id))
            return result.fetchone()[0]
1331203
def receivable_id(self, receivable_id):
        

        if receivable_id is None:
            raise ValueError("Invalid value for `receivable_id`, must not be `None`")
        if len(receivable_id) < 1:
            raise ValueError("Invalid value for `receivable_id`, length must be greater than or equal to `1`")

        self._receivable_id = receivable_id
956466
def request_entity_create(self, lid, epId=None):
        
        lid = Validation.lid_check_convert(lid)
        if epId is None:
            epId = self.__epId
        elif epId is False:
            epId = None
        else:
            epId = Validation.guid_check_convert(epId)
        logger.debug("request_entity_create lid='%s'", lid)
        return self._request(R_ENTITY, C_CREATE, None, {'epId': epId, 'lid': lid}, is_crud=True)
1241575
def add_entity(self, entity, second=False):
        ''' 
        '''
        if not entity in self._entities:
            if second:
                self._entities.append(entity)
            else:
                entity.set_world(self)
        else:
            raise DuplicateEntityError(entity)
1112464
def get_type_from_api_entity(self, api_entity):
        
        merged = self.group_types_data.copy()
        merged.update(self.indicator_types_data)
        print(merged)
        for (key, value) in merged.items():
            if value.get('apiEntity') == api_entity:
                return key
        return None
1344602
def register_entity_to_group(self, entity, group):
        '''
        
        '''
        if entity in self._entities:
            if group in self._groups:
                self._groups[group].append(entity)
            else:
                self._groups[group] = [entity]
        else:
            raise UnmanagedEntityError(entity)
351959
def get_by_entityid(self, entityid):
		
		data = self.list(entityid=entityid)
		if len(data) == 0:
			return None

		eid = int( next(iter(data)) )
		entity = self.get(eid)

		self.debug(0x01,entity)
		return entity
70282
def _HasId(self, schedule, entity_id):
    
    try:
      self._GetById(schedule, entity_id)
      has = True
    except KeyError:
      has = False
    return has
416393
private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) {
        if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) {
            uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID));
        }
    }
51253
function fixturizeEntityId (entityIdsMap, entityName, id) {
  if (!entityIdsMap[entityName]) {
    entityIdsMap[entityName] = {}
  }

  const map = entityIdsMap[entityName]

  // Do nothing if the passed id is already set
  if (map[id]) {
    return map[id]
  }

  // Do nothing if passed id is a normalized one
  const check = parseInt(id, 10)
  if (Object.values(map).includes(check)) {
    return check
  }

  // Otherwise calculate the new id and set it on the passed state map.
  // IDs start at 1000 to differentiate from issue/PR numbers
  const counter = Object.keys(map).length + 1000
  map[id] = counter

  // return the new id
  return map[id]
}
829506
@GetMapping(value = "/{entityTypeId}/exist", produces = APPLICATION_JSON_VALUE)
  public boolean entityExists(@PathVariable("entityTypeId") String entityTypeId) {
    return dataService.hasRepository(entityTypeId);
  }
811443
function do_save(id, isnew) {
        var mement = ent.data$(true, 'string')

        if (undefined !== id) {
          mement.id = id
        }

        mement.entity$ = ent.entity$

        entmap[base] = entmap[base] || {}
        entmap[base][name] = entmap[base][name] || {}

        var prev = entmap[base][name][mement.id]
        if (isnew && prev) {
          return reply(error('entity-id-exists', { type: ent.entity$, id: id }))
        }

        var shouldMerge = true
        if (options.merge !== false && ent.merge$ === false) {
          shouldMerge = false
        }
        if (options.merge === false && ent.merge$ !== true) {
          shouldMerge = false
        }

        mement = _.cloneDeep(mement)
        if (shouldMerge) {
          mement = _.assign(prev || {}, mement)
        }
        prev = entmap[base][name][mement.id] = mement

        seneca.log.debug(function() {
          return [
            'save/' + (create ? 'insert' : 'update'),
            ent.canon$({ string: 1 }),
            mement,
            desc
          ]
        })

        reply(null, ent.make$(prev))
      }
1319414
def getmergerequest(self, project_id, mergerequest_id):
        
        request = requests.get(
            '{0}/{1}/merge_request/{2}'.format(self.projects_url, project_id, mergerequest_id),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
875551
def _is_duplicate_record(self, rtype, name, content):
        """"""
        records = self._list_records(rtype, name, content)
        is_duplicate = len(records) >= 1
        if is_duplicate:
            LOGGER.info('Duplicate record %s %s %s, NOOP', rtype, name, content)
        return is_duplicate