Missing alias in hql update (select) statement with joined subclasses

Description

QbCustomer inherits from QbEntity and both tables have the Id field.

HQL is:

update QbInvoice i set i.Customer = (select c from QbCustomer c where c.QbId = ?) where i.QbId = ?

In the generated query, the "Id" field is missing the alias and is ambiguous.

update "QbInvoice" set "CustomerId"=
(select "Id"
from "QbCustomer" qbcustomer1_
inner join "QbEntity" qbcustomer1_1_ on qbcustomer1_."Id"=qbcustomer1_1_."Id"
where qbcustomer1_1_."QbId"=?) where "QbId"=?

Environment

None

Assignee

Unassigned

Reporter

Patrick Earl

Labels

None

Components

Fix versions

Affects versions

Priority

Trivial
Configure