1 | public void testDeleteSyntaxWithCompositeId() {↵ | | 1 | private void cleanup() {↵
|
2 | Session s = openSession();↵ | | 2 | Session s = openSession();↵
|
3 | Transaction t = s.beginTransaction();↵ | | 3 | Transaction txn = s.beginTransaction();↵
|
| | | 4 | ↵
|
4 | s.createQuery( "delete EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" ).executeUpdate();↵ | | 5 | s.createQuery( "delete Animal where description like 'grand%'" ).executeUpdate();↵
|
5 | s.createQuery( "delete from EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" ).executeUpdate();↵ | | 6 | s.createQuery( "delete Animal where not description like 'root%'" ).executeUpdate();↵
|
6 | s.createQuery( "delete from EntityWithCrazyCompositeKey e where e.id.id = 1 and e.id.otherId = 2" ).executeUpdate();↵ | | 7 | s.createQuery( "delete Animal" ).executeUpdate();↵
|
|
7 | t.commit();↵ | | 8 | txn.commit();↵
|
8 | s.close();↵ | | 9 | s.close();↵
|
9 | | | 10 |
|