Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Criteria for Subquery

 
Daiz Dew
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please help me to form a criteria for this query

UPDATE tickets
SET seller_cobrand = :arg1
WHERE id IN (SELECT T.id FROM tickets T, events E
WHERE
T.event_id = E.id AND
E.event_date > SYSDATE AND
T.SELLER_ID = :arg2 AND
T.quantity_remain > 0 AND
T.end_date > SYSDATE AND
T.system_status IN ('ACTIVE','INACTIVE'))
 
Christian Dillinger
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Criteria can only be used for reading data, so there is noch way to do an update like the one you posted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic