[b]Hibernate version:[/b]
[b]Mapping documents:[/b]
[b]Code between sessionFactory.openSession() and session.close():[/b]
Can somebody please tell me how to write the following query in HQL:
UPDATE WSZ_TERM t SET
(DOCUMENT_COUNT, DOCUMENT_COUNT_ACTUAL, TERM_FREQ_OVERALL)=
(
SELECT LN(t.document_count_actual + count(DOCUMENT_ID)),
t.document_count_actual + count(DOCUMENT_ID),
t.term_freq_overall + SUM(FREQ_PER_DOC_ACTUAL)
FROM WSZ_TERM_FREQUENCY_PER_DOC
WHERE BATCH_ID = ?
AND TERM_NAME=t.TERM_NAME
group by TERM_NAME
)
WHERE TERM_NAME IN
(
SELECT distinct(TERM_NAME)
FROM WSZ_TERM_FREQUENCY_PER_DOC
WHERE BATCH_ID = ?
)
Please help!
[b]Full stack trace of any exception that occurs:[/b]
[b]Name and version of the database you are using:[/b]
[b]Debug level Hibernate log excerpt:[/b]
|