@JoinFormula with {h-schema}

I’m trying to get the latest revision of project

@ManyToOne(fetch = FetchType.LAZY)
@JoinFormula("(select r.id from {h-schema}project_revisions r where r.project_id = id order by id desc limit 1)")
private ProjectRevision latestRevision;

but hibernate generates:

(select r.id from {h-project0_.schema}project_revisions project0_.r
 where r.project_id = project0_.id order by project0_.id desc limit 1)

I juts tried it and it works just fine.

However, if you have a use case where this feature does not work, try to replicate the problem with this test case template, and if you could replicate it, open a Jira issue.