Solving a problem
In this day and age, why are we still writing queries like this:
SELECT * FROM PERSON WHERE FIRST_NAME = %1
That type of query must be thirty years old! The ANSI spec for SQL was released in 1986, and its effects can be seen in countless languages.
So, is it any better to write something more like this:
SELECT e FROM Employee e WHERE e.firstName = :name
The last bit of code is JPA (Java Persistence API), based upon the open source Hibernate project (which has become JPA's reference implementation). Is this Java's improvement over writing pure SQL?
Maybe this fragment below is an enhancement?
create .select() .from(EMPLOYEE) .where(EMPLOYEE.FIRST_NAME.equal(name)) .fetch()
That last code snippet is jOOQ, and can help with code completion, but it seems that we are, basically, doing the same thing we've been doing for decades.
Especially, considering that we could do the same thing by merely creating this:
interface EmployeeRepository...