I am now exploring the JPA Criteria API for creating the dynamic queries and type safe queries. I am exploring how to use Specification. When I am exploring I found that toPredicate()
method using to create where clause for the query referenced by the entity. Also exploring about And/Or/Not and where in Specification.
Actually if toPredicate()
mMethod creating the where clause, then why we using the method "Where"? what is the role of other method when comparing toPredicate()
method?