Entity must be managed to call remove

前端 未结 2 573
离开以前
离开以前 2021-02-13 06:55

What\'s going on here?

@Stateless
@LocalBean
public class AppointmentCommentDao {
    public void delete(long appointmen         


        
2条回答
  •  你的背包
    2021-02-13 07:31

    Try this:

    entity = getEntityManager().getReference(AppointmentComment.class, entity.getId());
    getEntityManager().remove(entity);
    

提交回复
热议问题