This content has been marked as final.
Show 1 reply
-
1. Re: Seam Delete Method no working - Is Something Wrong?
lvdberg Jun 3, 2011 5:52 AM (in response to olasamuel)Hi,
hi look closely to your code again and see my remarks:
@Transactional // Should be inside a Transaction !! public void deleteUser() { // subscriber = new Subscriber(); // You're creating a new object, and then ask the database to find it? subscriber = entityManager.find(Subscriber.class, subscriber.getSubscriberId()); // If you take out the previous lijne, it will find the object subscribers.remove(subscriber.getSubscriberId()); // Is this a reference to the ID, should be a reference to a subscriber entityManager.remove(subscriber); entityManager.flush(); // add this line if you have manual flushing subscriberList(); } }
Hopefully this helps,
Leo