Home » Tag Archives: JBoss Hibernate (page 8)

Tag Archives: JBoss Hibernate

Hibernate 4 with Spring

jboss-hibernate-logo

1. Overview This article will focus on setting up Hibernate 4 with Spring – we’ll look at how to configure Spring 3 with Hibernate 4 using both Java and XML Configuration. Parts of this process are of course common to the Hibernate 3 article. 2. Maven To add the Spring Persistence dependencies to the project pom.xml, please see the article ...

Read More »

Hibernate 3 with Spring

jboss-hibernate-logo

1. Overview This article will focus on setting up Hibernate 3 with Spring – we’ll look at how to use both XML and Java configuration to set up Spring 3 with Hibernate 3 and MySQL. 2. Java Spring Configuration for Hibernate 3 Setting up Hibernate 3 with Spring and Java config is straightforward:       import java.util.Properties; import javax.sql.DataSource; ...

Read More »

Spring MVC: Security with MySQL and Hibernate

spring-interview-questions-answers

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. A regular case for any web-application is ...

Read More »

JPA – Hibernate – Type mapping on package level

jboss-hibernate-logo

When we are finally mature enough to use some custom types mapping in JPA, we usually stuck with some provider specific solution, because JPA itself doesn’t define any mechanism for doing it. Let me show you an example of custom type mapping definition for one of the JPA providers – Hibernate. Suppose that we use Joda Money in our project, ...

Read More »

JPA 2.0 Criteria Query with Hibernate

jboss-hibernate-logo

Criteria Query has been introduced in JPA 2.0. With the help of criteria queries you can write your queries in a type-safe way. Before criteria queries, developers had to write queries through the construction of object-based query definitions. There might be chances of incorrect syntax while building the queries. The criteria query API provides feature to create structured and nested ...

Read More »

Bidirectional @OneToMany / @ManyToOne association

jboss-hibernate-logo

One of goals in programming is representing of models from real world. Very often an application need to model some relationship between entities. In the last article about Hibernate associations I have described rules of setting up the “one to one” relationship. Today I’m going to show you how to setup bidirectional “one to many” and “many to one” association. ...

Read More »

Bidirectional @OneToOne primary key association

jboss-hibernate-logo

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 bidirectional @OneTonOne primary key association. An example from this tutorial based on previous article. Let’s get started. I will work with the same tables which I have created previously. In order to setup a bidirectional ...

Read More »

Bulk fetching with Hibernate

jboss-hibernate-logo

If you need to process large database result sets from Java you can opt for JDBC to give you the low level control required. On the other hand if you are already using an ORM in your application falling back to JDBC might imply some extra pain. You would be losing features such as optimistic locking, caching, automatic fetching when ...

Read More »

Migrating from Hibernate 3 to 4 with Spring integration

jboss-hibernate-logo

This week it was time to upgrade our code base to the latest Hibernate 4.x. We postponed our migration (still being on Hibernate 3.3) since the newer maintenance releases of the 3.x branch required some API changes which were apparently still in flux. An example is the UserType API which was still showing flaws and was going to be finalized ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.