Can Querydsl be used without generated query types?

For example, the JPA Criteria API can be used without a generated metamodel. The security type is lost, but I can create a query without first knowing the data model, using only reflection at run time. I would also like to use Querydsl. I don’t care about type safety, since I don’t know at all the data model is ahead.

In my recent project, I would like to use Querydsl mainly because it is another layer on top of tenacity. Therefore, I can hope that you will use the same queries for JPA, JDO, JDBC, Lucene, Hibernate Search, MongoDB, Collections, and RDFBean.

Or is there an alternative to Querydsl that can be used as described?

As NoSQL databases are on the rise. Is there any other structure that represents a similar abstract layer over the various providers of persistence?

+5
source share
1 answer

There are two ways to use Querydsl without a generated metamodel.

The first way is to create your expressions manually http://www.querydsl.com/static/querydsl/2.9.0/reference/html/ch03.html#d0e1379

and the second is to use the functionality of the Querydsl alias http://www.querydsl.com/static/querydsl/2.9.0/reference/html/ch02s07.html

Querydsl , , Querydsl .

, , , .

, JPA JDO RDBMS, OODB NoSQL.

+5

All Articles