FETCH JOIN is still a JOIN

JPA’s FETCH JOIN is useful in cases when you want to eagerly load some lazy loaded collection of your entity. By default all @OneToMany and @ManyToMany relationships are lazy loaded. There are some valid cases when (despite the settings in your mapped entity), you want to eagerly load the related entity. One of the way of doing it is to use JOIN FETCH JPQL clause. It’s worth remembering that JOIN FETCH is used mainly because of its side-effect of populating the pointed relationship – it’s still a JOIN and must be treated like it when it comes to the duplicated result set problem. ...

October 5, 2012 · 3 min

After the Spring Core 3.0 Exam

Yesterday I took the SpringSource Certified Spring 3.0 Professional exam and passed it successfully with 94%. Below you can find some information about my preparation process, the exam form and the type of questions. So, here we go. Preparation I attended the Spring 3 Core training and described it here. This was the entry point for my learning process. I’ve done a lot of notes during the training, so even after three months, the slides + notes were pretty decent source of knowledge. ...

July 24, 2012 · 3 min

Hibernate3 and Maven2

Tonight I’ve fought with making Maven and Hibernate to cooperate… After 1,5h struggle, I’ve decided to write down what I’ve “discovered”. When adding dependencies to your persist module you should avoid adding the hibernate package dependency itself as there should be only hibernate-annotations one. When adding log4j dependency remember that version 1.2.15 is messed up and forces you to download jars from SUN webpages if you want to get rid of those nasty dependency errors that maven throw in your face… Instead of 1.2.15 choose 1.2.14 as it’s dependencies are not optional and Maven will successfully download all of them. When adding slf4j (Simple Logging Factory For Java) remember that when you add slf4j-log4j12 package it comes with depended package slf4j-api but the versions might (and are!) non-compatible… In my case slf4j-log4j12 v. 1.5.6 came with slf4j-api v. 1.4.2. You should exclude slf4j-api dependency from slf4j-log4j12 and add it separately in the same version as slf4j-log4j12 (in this case 1.5.6).

May 30, 2009 · 1 min