eclipselink - How do I delete all JPA entities? -
in testing code need have blank/empty database @ each method. there code achieve that, call in @before of test?
actually can use jpql,
em .createquery("delete myentity m") .executeupdate() ;
but note, there no grants entity cache cleaned also. unit-test purposes solution.
Comments
Post a Comment