Developers always need to take care about code they produced. They should be ensured that the code works properly after a new feature was implemented or some bug was fixed. That can be achieved with the help of unit tests. Since this blog is dedicated to the Java programming language, today I will write an article about the JUnit 4.1 and EasyMock 3.1 frameworks. The main purpose of these frameworks is to make writing of unit tests easier. As alternative you can read about JUnit and Mockito.
Monthly Archives March 2013
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.
It's time to continue articles about Hibernate. The last one was dedicated to unidirectional @OneToOne association. So today I will show you how to obtain a bidirectional @OneToOne primary key association. An example from this tutorial is based on the previous article. Let's get started.
In this post I want to make a concise investigation regarding one very popular Hibernate exception. Today I will talk about id generating for some table, and if to be more precise, about cases when we need to assign id manually. Let's start.
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.