I am using Spring data jpa for creating service. In following code I am using Querydsl for implementing search filter on grid. But for building name I am not able to filter the
The NPE that you get is probably related to the limitation of QueryDsl where you cannot exceed four levels.
Your code exceeds four levels.
roomTransfer.roomDeptMap.room.building.sBuildName
You can read more on official documentation or related stackoverflow's question.
In the first link there is a solution to overcome this issue using QueryInit
annotation.
If you do not want to alter your entity class you can perform a join (if possible) with an alias for the first 2 or 3 levels and then use this alias to complete the query.