I am currently introducing querydsl-sql into my project as a replacement for Mybatis. We need to do a lot of ad-hoc queries, so it suits our needs much better.
I have implemented a simple repository layer on top of querydsl so that my team members just need to inherit from a base class and get all the usual CRUD operations for free.
One thing I would like to add is in-memory repositories for testing. Currently we use Easymock to mock a repository for unit tests. But that gets tedious very quickly.
The problem is that querydsl-sql uses the column name as the path name, so querydsl-collections looks for the wrong fields. E.g. it looks for "first_name" when it should be looking for "firstName".
One way to solve this would be to add a layer on top of "Path", named "Column", e.g.:
The SQL serializer and the generator would need to be changed for this. Do you see an easier way of doing this?
The text was updated successfully, but these errors were encountered: