[WTF] Criteria API

This is the best representation of what I want to say about JPA criteria API:

http://www.odi.ch/weblog/posting.php?posting=667

 

 

The equivalent JPQL query is:

[code]FROM Pet[/code]

The equivalent SQL query is:

[code]SELECT * FROM Pet[/code]

Clearly SQL is too simple and boring. You really need a bullshit API to produce a simple SQL query. Of course this will ease maintenance, improve performance, reduce code, prevent bugs, speed up development by a factor of 10 and reduce your project cost by 99% at least. A classic case of overengineering.

Leave a Reply

Your email address will not be published. Required fields are marked *