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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -