Skip to content

Instantly share code, notes, and snippets.

@beydogan
Created June 11, 2013 12:00
Show Gist options
  • Save beydogan/5756302 to your computer and use it in GitHub Desktop.
Save beydogan/5756302 to your computer and use it in GitHub Desktop.
public void deleteRoute(int routeId){
Route r = em.find(Route.class, routeId);
em.getTransaction().begin();
em.remove(r);
em.getTransaction().commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment