In Chapter 7, Accessing Database with Spring and JDBC Template Patterns, we have learned how to access database using JBDC and how Spring can remove boilerplate code from the developer end to the framework by using template pattern and callbacks. In this chapter, we will learn one advanced step of accessing database using the Object Relational Mapping (ORM) Framework and managing transactions across the application.
When my son, Arnav, was one and a half years old, he used to play with a dummy mobile phone. But as he grew up, his needs too outgrew dummy mobiles to smartphones.
Similarly, when your application has a small set of data for a business tier, then JDBC works fine, but as your application grows and becomes more complex, it becomes difficult to map tables to the objects in the application. JDBC is the dummy small phone of the data access world. But with complex applications, we need Object Relational...