HHH-12875 : Fixe ParentChildTest to work in 5.1 branch

This commit is contained in:
Gail Badner 2018-08-02 13:02:22 -07:00
parent 7512633435
commit e69be8a1ab
1 changed files with 2 additions and 2 deletions

View File

@ -519,11 +519,11 @@ public class ParentChildTest extends LegacyTestCase {
s.delete( s.get( Part.class, p1.getId() ));
// p2.description does not satisfy the condition on Part mapping, so it's not possible to retrieve it
// using Session#get; instead just delete using a native query
s.createNativeQuery( "delete from baz_moreParts where baz = :baz AND part = :part" )
s.createSQLQuery( "delete from baz_moreParts where baz = :baz AND part = :part" )
.setParameter( "baz", baz.getCode() )
.setParameter( "part", p2.getId() )
.executeUpdate();
s.createNativeQuery( "delete from Part where id = :id" ).setParameter( "id", p2.getId() ).executeUpdate();
s.createSQLQuery( "delete from Part where id = :id" ).setParameter( "id", p2.getId() ).executeUpdate();
s.delete(baz);
t.commit();
s.close();