Database type casting fails when using @Formula

Description

Asuming the following entity:

When trying to load the entity, the following SQL query is generated:

The problem is that the casting type (e.g. double) is given an alias (e.g. centsanddo0_.double).

It's worth noting that casting works just fine for JPQL queries:

Which generates the right SQL statement:

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Vlad Mihalcea

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure