Is there a way to inject an Entity property dynamically to @Query
? My need is to implement a method like follows:
@Query("select e from #{#entityName} e where e.***columnName*** = ?2")
List<T> findAll(String ***columnName***, String value);
Any other simple ways of doing this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…