Hibernate Tips is a series of posts in which I describe a quick and easy solution for common Hibernate questions. If you have a question for a future Hibernate Tip, please post a comment below.
One of the readers of my article about using Hibernate with a MySQL database asked the following question:
What is the difference between the following two recommended approaches concerning the primary keys?
@GeneratedValue(strategy = GenerationType.IDENTITY)
@GeneratedValue(generator = "native") @GenericGenerator(name = "native", strategy = "native")