I’m Using Hibernate with JPA and MySql.
SQL Tabel have ClassTable—->TimeTable—–>Skillset—–>Course
the above arrow marks are showing one to many Relation ship.
Now in my Java code …
public List<ClassTableVO> getClassTables() {
return entityManager.createQuery("from ClassTableVO",
ClassTableVO.class).getResultList();
}
But my requirement is Count the courses, How many in the ClassTable.
For example ClassTabel Have 10 record and 4 records java and 6 records flex now i want to these count and storing one integer variable …
Here you go,