I have a legacy code like this: AbstractEntity.java @Entity @Table("entity") public class AbstractEntity { private long id; private transient String source; @override public void setId(long id) { this.id = id; } @override @Id public long getId() { return id; } @override public void setSource(String source) { this.source = source; } } Entity.java public class Entity extend AbstractEntity { @override @column("source") public String getSource() { return source; } } public interface EntityRepository extends JpaRepository<Entity, Long> { @Query("SELECT d.id FROM Entity d WHERE d.source = :type") List<Long> findIdsBySourceTypeAndSourceIds( @Param("type") String type); } Since source field in AbstractEntity is transient it is giving error: Could not resolve property source of AbstractEntity. in Hibernate 5.4.9 It was working fine in Hibernate 4.3.7. |