Spring MVC Single File Upload Example

In this tutorial I am going to show you an example on how to upload a single file using Spring MVC. If you need to upload multiple files then you can go through Spring MVC Multiple Files Upload Example. I am using Spring Boot framework to implement single file upload example. I am using Thymeleaf as a template file for…

Infinite dynamic Multi-level nested category with Codeigniter and MySQL

Introduction Here I will show you how to create infinite multi-level nested categories with Codeigniter and MySQL. In my previous tutorial Infinite dynamic Multi-level nested category with PHP and MySQL , I wrote how to build a nested multilevel categories. So I am again going to write the same tutorial but this time with Codeigniter 3 framework. Prerequisites Codeigniter 3.1.11, PHP…

JPA Criteria API

Introduction This tutorial will show you how to use JPA(Java Persistence API) Criteria API Queries for selecting data from database. The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. The Criteria API is used to define queries for entities and their persistent state by creating…

Many to Many Mapping in JPA

In this example I am going to show you how we can implement Many to Many(@ManyToMany) relationship using JPA persistence API in Java. The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. The JPA is used to reduce the burden of writing codes for relational…

One to One Mapping in JPA

In this example I am going to show you how we can implement One to One(@OneToOne) relationship using JPA persistence API in Java. The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. The JPA is used to reduce the burden of writing codes for relational…

One to Many Mapping in JPA

In this example I am going to show you how we can implement One to Many(@OneToMany) relationship using JPA persistence API in Java. The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. The JPA is used to reduce the burden of writing codes for relational…

Many to One Mapping in JPA

In this example I am going to show you how we can implement Many to One(@ManyToOne) relationship using JPA persistence API in Java. The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. The JPA is used to reduce the burden of writing codes for relational…

JPA Inheritance Strategy : Table Per Concrete Class Hierarchy (TABLE_PER_CLASS)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…

JPA Inheritance Strategy : Table Per Sub-Class Hierarchy (JOINED)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…

JPA Inheritance Strategy : Table Per Class Hierarchy (SINGLE_TABLE)

JPA comes with a provision to create tables and populate them as per the Java classes involved in inheritance. JPA offers basically three different approaches to map hierarchical classes – classes involved in inheritance with database tables. Observe, in the above hierarchy, three classes are involved where Person is the super class and Student and Teacher are sub-classes with their…