[jboss-user] [EJB/JBoss] - Re: Way to implement a removeAll() method?

2007-06-08 Thread seansawyer
Except, unfortunately, that the project in question does not use Hibernate. It seems that there is no way to accomplish this through EJB: http://forum.java.sun.com/thread.jspa?threadID=5174100messageID=9671593 The impetus for this post was that, with a sufficiently large number of entities, I

[jboss-user] [EJB/JBoss] - Re: Way to implement a removeAll() method?

2007-06-07 Thread khkachn
Can't you do something like: int deletedEntities = entityManager.createQuery(delete from Customer); if you want to remove all records from a customer table? I have not tried this yet, but it works in Hibernate based on their documentation: