Tag Archives: hibernate

Choosing the right identity

When working with databases, a problem we all face, is how to uniquely identify each new record that gets introduced into the system. Most of the time we want some kind of generated sequential number. In particular we’ll look at how an ORM can be configured to have these identifiers generated for you in a central place like the database. An ORM will hide most of the dirty details and therefore is often considered as a kind of magic box. That’s why people tend to stick to the defaults, even though this is not always the best approach and can be the cause of many headaches. This post will explain some of the different options available and their benefits, so you can at least make an informed choice instead of blindly using the defaults.
Continue reading Choosing the right identity