Skip to content
Thorben Janssen
  • BlogExpand
    • Tutorials
    • Hibernate Tips
    • Video Tutorials
  • Persistence Hub
  • Workshops
  • Consulting
  • Book
  • AboutExpand
    • About
    • Talks
    • Contact
Sign In
Thorben Janssen

Primary Key

  • How to generate UUIDs as primary keys with Hibernate
    Hibernate Advanced | Hibernate 5 | Hibernate 6

    How to generate UUIDs as primary keys with Hibernate

    ByThorben Janssen

    Most developers prefer numerical primary keys because they are efficient to use and easy to generate. But that doesn’t mean that a primary key has to be a number. UUIDs, for example, have gained some popularity over recent years. The main advantage of a UUID is its (practical) global uniqueness which provides a huge advantage…

    Read More How to generate UUIDs as primary keys with HibernateContinue

  • Sequence naming strategies in Hibernate 6
    Hibernate 6 | Hibernate Advanced

    Sequence naming strategies in Hibernate 6

    ByThorben Janssen

    Hibernate 6 introduced a new configuration parameter and an interface to define the implicit naming strategy for database sequences and tables used to generate primary key values. When you migrate an existing application to Hibernate 6, you quickly recognize that change because the default naming strategy has changed. Due to that, Hibernate might try using…

    Read More Sequence naming strategies in Hibernate 6Continue

  • Hibernate Tip: How to customize the association mappings using a composite key
    Hibernate Tips

    Hibernate Tip: How to customize the association mappings using a composite key

    ByThorben Janssen

    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. Question: “One of my entities uses an @IdentityClass to map a composite primary key, and I need to map a…

    Read More Hibernate Tip: How to customize the association mappings using a composite keyContinue

  • Hibernate Tip: Many-to-Many Association with additional Attributes
    Hibernate Tips

    Hibernate Tip: Many-to-Many Association with additional Attributes

    ByThorben Janssen

    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. Question: I got several questions, like the following one by Carme, about the mapping of a many-to-many association that contains…

    Read More Hibernate Tip: Many-to-Many Association with additional AttributesContinue

  • Hibernate Tip: Using LEFT JOIN and FETCH JOIN in a CriteriaQuery
    Hibernate Tips

    Hibernate Tip: Using LEFT JOIN and FETCH JOIN in a CriteriaQuery

    ByThorben Janssen

    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. Question: In one of my previous Hibernate Tips, I explained the difference between a JOIN, a LEFT JOIN, and a…

    Read More Hibernate Tip: Using LEFT JOIN and FETCH JOIN in a CriteriaQueryContinue

Page navigation

1 2 3 4 Next PageNext

Join the Newsletter

Join 10k+ subscribers to get a persistence tip every weekday.

I will collect, use and protect your data in accordance with my privacy policy.

Level up your skills!

  • In-depth courses
  • Expert sessions
  • Monthly persistence news
Learn more!
Twitter YouTube Github Facebook Xing Linkedin
  • Disclaimer
  • Privacy Policy
  • Terms of Service
  • Imprint
  • Contact
  • Change privacy settings
  • Privacy settings history
  • Revoke consents

© 2025 Thorben Janssen, all rights reserved.

  • Blog
    • Tutorials
    • Hibernate Tips
    • Video Tutorials
  • Persistence Hub
  • Workshops
  • Consulting
  • Book
  • About
    • About
    • Talks
    • Contact
Search