Example:
List<Object[]> list = em.createQuery(
"SELECT 'Foo', 123 FROM IrcEvent ev", Object[].class).getResultList();
What I don't like in that example:
- How do I know the table name? Can't I specify the entity class instead?
- How do I know the column name? jOOQ provides auto-completion by creating a DSL from the database schema.
- There could be syntax errors everywhere.
What I basically want is something like
entityManager.deleteAll(EntityClass.class);
to delete the rows of an antire table (for example).