Best Practices for Many-To-One and One-To-Many Association Mappings
|

Best Practices for Many-To-One and One-To-Many Association Mappings

When you model your database, you will most likely define several many-to-one or one-to-many associations. And it’s, of course, the same when you model your entities. It’s quite easy to do that with JPA and Hibernate. You just need an attribute that represents the association and annotate it with a @ManyToOne or @OneToMany association. But…

Version-Based Database Migration with Liquibase – Update an Existing Database

Version-Based Database Migration with Liquibase – Update an Existing Database

I showed you in the previous post of this series, how you can use Liquibase to create a new database. That’s a required first step but it’s not the one that provides you the most benefits. And there are several other ways to do the same, like JPA’s feature to execute SQL scripts at startup….