|
SQL->Criteria howto: msg#00119jakarta.turbine.torque.user
Hi all, I'd like to express this SQL in criteria syntax, but smth. is still missing: SELECT VORAVIS.VAVI_ID, VORAVIS.SEQUENZ FROM VORAVIS WHERE VORAVIS.AUFT_ID=67537 AND VORAVIS.SEND_SEQUENZ IN ( SELECT MAX(va.SEND_SEQUENZ) FROM VORAVIS va WHERE va.AUFT_ID=VORAVIS.AUFT_ID AND va.SEQUENZ=VORAVIS.SEQUENZ ) My main problem is how to create the table alias "va" in the IN clause. Using the criteria.addAlias() method gives me "FROM VORAVIS, VORAVIS va", i.e. double table statements. For the in clause I use an adjusted criteria class supporting the addIn(column, criteria) operation, basically just writing "column IN query". What am I missing? Thanks, Tino |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: torque:om-generate says successful, but no java generated?: 00119, Malcolm Kendall |
|---|---|
| Next by Date: | Antwort: SQL->Criteria howto: 00119, Thomas Fischer |
| Previous by Thread: | torque:om-generate says successful, but no java generated?i: 00119, Phillip Rhodes |
| Next by Thread: | Antwort: SQL->Criteria howto: 00119, Thomas Fischer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |