Sort List In Groovy

If we have a simple list like List list = [4, 2, 9, 6, 7, 8, 2] We can easily sort this list using assert list.sort() == [2, 2, 4, 6, 7, 8, 9] or by using closure like assert list.sort { it } == [2, 2, 4, 6, 7, 8, 9] Both gives us a list sorted in ascending order....

Dealing with LazyInitializationException

Hi Guys! I am back with a new Post titled “Dealing with LazyInitializationException”. In Hibernate “lazy initialization” is one of the key feature of Hibernate which allows it to lazily initialize associated properties of an object. For...

Accessing indirect properties using Criteria

Hi Guys! I am back with a new post titled “Accessing indirect properties using Criteria”. In Hibernate Criteria when we try to reference an indirect property of an object(A property that is part of another mapped object) then we get the following...