Buggy code:
public class TestInverseEagerSQL extends SQLListenerTestCase { public int numCustomers = 1 ; public int numOrdersPerCustomer = 4 ; public void setUp ( ) { <START_BUG> setUp ( Customer . class , CustomerKey . class , Order . class , EntityAInverseEager . class , EntityA1InverseEager . class , EntityA2InverseEager . class , EntityBInverseEager . class , EntityCInverseEager . class , EntityDInverseEager . class , Publisher . class , Magazine . class ) ; <END_BUG> EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; Customer . CustomerKey ck = new Customer . CustomerKey ( "USA" , 1 ) ; Customer c = new Customer ( ) ; c . setCid ( ck ) ; c . setName ( "customer1" ) ; em . persist ( c ) ; for ( int i = 0 ; i < ( numOrdersPerCustomer ) ; i ++ ) { Order order = new Order ( ) ; order . setCustomer ( c ) ; em . persist ( order ) ; } EntityAInverseEager a = new EntityAInverseEager ( "a" ) ; em . persist ( a ) ; EntityA1InverseEager a1 = new EntityA1InverseEager ( "a1" ) ; em . persist ( a1 ) ; EntityA2InverseEager a2 = new EntityA2InverseEager ( "a2" ) ; em . persist ( a2 ) ; for ( int i = 0 ; i < 4 ; i ++ ) { EntityBInverseEager b = new EntityBInverseEager ( ( "b" + i ) ) ; a . addB ( b ) ; b . setA ( a ) ; em . persist ( b ) ; } for ( int i = 4 ; i < 8 ; i ++ ) { EntityBInverseEager b = new EntityBInverseEager ( ( "b" + i ) ) ; a1 . addB ( b ) ; b . setA ( a1 ) ; em . persist ( b ) ; } for ( int i = 8 ; i < 12 ; i ++ ) { EntityBInverseEager b = new EntityBInverseEager ( ( "b" + i ) ) ; a2 . addB ( b ) ; b . setA ( a2 ) ; em . persist ( b ) ; } for ( int i = 0 ; i < 4 ; i ++ ) { EntityCInverseEager c1 = new EntityCInverseEager ( ( "c" + i ) , i , i ) ; em . persist ( c1 ) ; EntityDInverseEager d1 = new EntityDInverseEager ( ( "d" + i ) , ( "d" + i ) , i , i ) ; em . persist ( d1 ) ; c1 . setD ( d1 ) ; d1 . setC ( c1 ) ; } Publisher p1 = new Publisher ( ) ; p1 . setName ( "publisher1" ) ; em . persist ( p1 ) ; for ( int i = 0 ; i < 4 ; i ++ ) { Magazine magazine = new Magazine ( ) ; magazine . setIdPublisher ( p1 ) ; magazine . setName ( ( ( ( "magagine" + i ) + "_" ) + ( p1 . getName ( ) ) ) ) ; em . persist ( magazine ) ; } Publisher p2 = new Publisher ( ) ; p2 . setName ( "publisher2" ) ; em . persist ( p2 ) ; for ( int i = 0 ; i < 4 ; i ++ ) { Magazine magazine = new Magazine ( ) ; magazine . setIdPublisher ( p2 ) ; magazine . setName ( ( ( ( "magagine" + i ) + "_" ) + ( p2 . getName ( ) ) ) ) ; em . persist ( magazine ) ; } em . flush ( ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } public void testOneToManyInverseEagerQuery ( ) { } public void testOneToOneInverseEagerQuery ( ) { } public void testOneToManyInheritanceQuery ( ) { } public void testOneToManyEagerInverseLazyQuery ( ) { } public void testTargetOrphanRemoval ( ) { } public void testSourceOrphanRemoval ( ) { } public static void main ( String [ ] args ) { } }

Fix:
setUp ( Customer . class , CustomerKey . class , Order . class , EntityAInverseEager . class , EntityA1InverseEager . class , EntityA2InverseEager . class , EntityBInverseEager . class , EntityCInverseEager . class , EntityDInverseEager . class , Publisher . class , Magazine . class , DROP_TABLES ) ;