private void updateAssociatedTableWithFK(DataSupport baseObj){
  Map<String,Set<Long>> associatedModelMap=baseObj.getAssociatedModelsMapWithFK();
  ContentValues values=new ContentValues();
  for (  String associatedTableName : associatedModelMap.keySet()) {
    values.clear();
    String fkName=getForeignKeyColumnName(baseObj.getTableName());
    values.put(fkName,baseObj.getBaseObjId());
    Set<Long> ids=associatedModelMap.get(associatedTableName);
    if (ids != null && !ids.isEmpty()) {
      mDatabase.update(associatedTableName,values,getWhereOfIdsWithOr(ids),null);
    }
  }
}

private void updateAssociatedTableWithFK ( DataSupport baseObj ) { Map < String , Set < Long > > associatedModelMap = baseObj . getAssociatedModelsMapWithFK ( ) ; ContentValues values = new ContentValues ( ) ; for ( String associatedTableName : associatedModelMap . keySet ( ) ) { values . clear ( ) ; String fkName = getForeignKeyColumnName ( baseObj . getTableName ( ) ) ; values . put ( fkName , baseObj . getBaseObjId ( ) ) ; Set < Long > ids = associatedModelMap . get ( associatedTableName ) ; if ( ids != null && ! ids . isEmpty ( ) ) { mDatabase . update ( associatedTableName , values , getWhereOfIdsWithOr ( ids ) , null ) ; } } }
update the foreign keys in the associated model ' s table .
