@NaturalId – A good way to persist natural IDs with Hibernate?

@NaturalId – A good way to persist natural IDs with Hibernate?

In the real world, most objects have a natural identifier. Typical examples are the ISBN number of a book, a company’s tax identifier or a person’s social security number. You could, of course, use these identifiers as primary keys. But most often, it’s a better idea to generate numeric, surrogate keys. They are easier to…