I have a few entities in a type hierarchy (single table). When I do an UPDATE query that uses the type() function, the resulting SQL uses a table alias for the type field, but there's no alias in the FROM clause:
UPDATE Pet p
SET p.name = :name
WHERE p.id = :id AND type(p) in (:types)
becomes
update Pet
set NAME=?
where
id=3 and (pet0_.PET_TYPE in (?))
which then leads to an error Column "PET0_.PET_TYPE" not found This is similar to:
Will add small app to reproduce this issue. |