我想从列表播放器中删除播放器,但我不能使用关系OneTomany 但更新不会删除播放器
public void delete_player(Player playerId,Member member){
Session session = sessionFactory.getCurrentSession();
Transaction tx = session.getTransaction();
tx.begin();
try {
member.getPlayers().remove(playerId);
session.saveOrUpdate(member);
tx.commit();
} catch (RuntimeException e) {
tx.rollback();
}
}