-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as duplicate of#2327
Closed as duplicate of#2327
Copy link
Labels
in: repositoryRepositories abstractionRepositories abstractionstatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
I'm implementing a dynamic query with following code.
userRepository.findBy(QUser.user.id.isNotNull(), q -> q.project("username").as(UserWithUsernameOnly.class).all());
But the generated query still select all of the columns.
select user0_.id as id1_0_, user0_.create_date as create_d2_0_, user0_.created_by as created_3_0_, user0_.last_modified_by as last_mod4_0_, user0_.last_modified_date as last_mod5_0_, user0_.password as password6_0_, user0_.username as username7_0_, user0_.version as version8_0_ from users user0_ where user0_.id is not null
I expect the generated query should only select the specified column.
Here is the reproducible repo.
https://github.com/kekhuay/special-palm-tree
mwyrembl, gbuyan, A1583, BOYZA408, parinaasseenndd and 6 moreparinaasseenndd and BOYZA408parinaasseenndd, BOYZA408 and nfalco79parinaasseennddparinaasseenndd, BOYZA408, rjdkolb and sitaryo
Metadata
Metadata
Assignees
Labels
in: repositoryRepositories abstractionRepositories abstractionstatus: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement