With spring 3.4.6 this basic query work

@Query("""
                select isbn from Isbn isbn
                where isbn.id=
                    (select max(i1.id) 
                    from Isbn i1
                    left join i1.editeur e
                    where lower(i1.e.code) like lower(:code)
                    and i1.code is not null
                    and lower(i1.codeClean) like (concat(:root,'%'))
                    )
            """)
    Isbn lastNumber(String code, String root);

With update to spring boot 3.5.0 (who use same hibernate version)

I got this error

"org.hibernate.query.SyntaxException: At 1:62 and token ')', no viable alternative at input 'select new com.acme.entity.Isbn(*) from Isbn isbn where isbn.id = (select max(i1.id) from Isbn i1 left join i1.editeur e where lower(i1.e.code) like lower(:code) and i1.code is not null and lower(i1.codeClean) like (concat(:root, '%')))' "

Comment From: philwebb

Could you please provide the full stacktrace and ideally a sample that reproduces the issue.