Skip to content

Instantly share code, notes, and snippets.

@hoandang
Created February 23, 2013 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoandang/5020194 to your computer and use it in GitHub Desktop.
Save hoandang/5020194 to your computer and use it in GitHub Desktop.
Get Id from the persisted object JPA
import javax.persistence.GenerationType;
import javax.persistence.GeneratedValue;
@GeneratedValue(strategy=GenerationType.IDENTITY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment