hibernate - Referencing field from joined type in update -
i have problem inheritance:
a class item , class user witch extends item
@inheritance(strategy= inheritancetype.joined) @entity @table(name = "item") public class item{ ... date lastdate; } @entity @table(name = "user") public class user extends item{ ... date logindate }
and want query:
update user u set u.lastdate=u.logindate u.id = ?1
but throw exception: unknown column 'logindate' in 'field list'
, because tries execute this:
update item set lastdate=logindate (item_id) in (select item_id ht_user)
how can reference item.lastdate , user.logindate in hql update query?
Comments
Post a Comment