यहां क्या हो रहा है?इकाई को कॉल करने के लिए प्रबंधित किया जाना चाहिए
@Stateless
@LocalBean
public class AppointmentCommentDao {
public void delete(long appointmentCommentId) {
AppointmentComment ac = em.find(AppointmentComment.class, appointmentCommentId);
if (ac != null)
{
em.merge(ac);
em.remove(ac);
}
}
@PersistenceContext
private EntityManager em;
}
कॉल पर remove
को मैं संदेश जा रहा है Entity must be managed to call remove: ...., try merging the detached and try the remove again.
em.find (...) विधि के साथ यह हल। –