Home » Tag Archives: JBoss Hibernate (page 7)

Tag Archives: JBoss Hibernate

Efficiently delete data with JPA and Hibernate

jboss-hibernate-logo

You may come to the situation where you have to perform a bulk deletion on a huge amount of datasets stored in a relational database. If you use JPA with Hibernate as underlying OR mapper, you might try to call the remove() method of the EntityManager in a way like the following:               public ...

Read More »

Hibernate Facts: Favoring bidirectional Set(s) vs List(s)

jboss-hibernate-logo

Hibernate is a great ORM tool, and it eases development considerably, but it has a lot of gotchas you must be aware of if you want to use it properly. On medium to large projects it’s very common to have bidirectional parent-child associations, which allow us to navigate both ends of a given relationship. When it comes to controlling the ...

Read More »

Natural Ids in Hibernate

jboss-hibernate-logo

A natural id is a property or a set of properties that would identify an entity uniquely. We can have at-most one natural id defined for an entity. When Hibernate sees natural-id tag in an entity mapping file, it automatically creates unique and not-null constraints on the properties constituting natural-id. First, let us look at examples of simple and composite ...

Read More »

How to maintain history of tables in Hibernate

jboss-hibernate-logo

To Maintain history of database or keep track of modification of database table row , we create a version table that contains fields identical to original table.Whenever original table gets changed , we create another entry in version table. So for every update query , we have to write an insert query in version table . There is a module ...

Read More »

Spring JPA Data + Hibernate + MySQL + Maven

spring-data-logo

Development of web-applications with the help of Spring MVC implies creation of several logical layers of architecture. One of the layers is a DAO (Repository) layer. It is responsible for communication with a database. If you developed the DAO layer at least once, you should know that it involves a lot of boilerplate code. A Spring Data take a part ...

Read More »

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 »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close