private void deleteRelation ( Object connection , EntityMetadata entityMetadata , String rowKey ) { List < String > relations = entityMetadata . getRelationNames ( ) ; if ( relations != null ) { for ( String relation : relations ) { if ( resource != null && resource . isActive ( ) ) { ( ( Transaction ) connection ) . hdel ( getHashKey ( entityMetadata . getTableName ( ) , rowKey ) , relation ) ; } else { ( ( Pipeline ) connection ) . hdel ( getHashKey ( entityMetadata . getTableName ( ) , rowKey ) , relation ) ; } } } /* * Response<Map<String, String>> fields = null; if (resource != null && * resource.isActive()) { fields = ((Transaction) * connection).hgetAll(getHashKey(entityMetadata.getTableName(), * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); } * for (String field : fields.get().keySet()) { ((Transaction) * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), * field); } } else { fields = ((Pipeline) * connection).hgetAll(getHashKey(entityMetadata.getTableName(), * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); } * for (String field : fields.get().keySet()) { ((Pipeline) * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), * field); } } */ }
On delete relation .