Recently I've worked on a part of project where are a lot of entities. As in many other projects with the same feature there was implemented "soft delete" approach. That's mean that when someone deletes any entity it remains in a database but a special field (e.g. 'isDeleted') changes its value to true.
Not so long time ago I have to work with in-memory database. This activity was related to integration testing. As you know, it is a normal practice to use in-memory data bases for the integration testing. There are several reasons for this: portability, well grained environment infrastructure, high performance, consistency of original data base.
Spring has a lot of different modules. All of them are useful for the concrete purposes. Today I'm going to talk about Spring Security. This module provides flexible approach to manage permitions for access to different parts of web-application. In the post I'll examine integration of Spring MVC, Hibernate, MySQL with Spring Security.
In this article I want to examine an example of Spring MVC + Hibernate + Maven usage. This set of technology implies basic knowledge of the domain area. So I will try to explain all essential moments in detail. The other things which are out of topic, will be provided with links to more detail sources. In the end of the post I will publish a link to GitHub. Now you can try a new tutorial on the same theme but with Spring Data JPA.
There are a lot of articles about Hibernate associations in the internet and particularly on my blog. But JPA provides numerous combinations of associations, so it's not strange that we still see new posts about this or that kind of association. Today I want to examine situation with the @JoinTable annotation and intermediary table. For the tutorial I'll use MySQL, Hibernate as implementation of JPA and Maven.
One of goals the in programming is representation of models from the real world. Very often an application needs to model some relationship between entities. In the last article about Hibernate associations I described the rules of setting up a "one to one" relationship. Today I'm going to show you how to setup a bidirectional "one to many" and "many to one" association. This example will be based on previous Hibernate tutorials.
Today I want to show you an example of unidirectional one to one association using primary key. It can be a little bit difficult for beginners to setup such association but I will try my best to explain all aspects in a clear way. For this tutorial I choose MySQL as a database, also I will use Hibernate and JPA annotations.