}
public void testAttributedJoin() throws Exception {
Session s = openSession();
s.getTransaction().begin();
Country country = new Country();
country.setName( "Australia" );
s.persist( country );
Boy boy = new Boy();
boy.setFirstName( "John" );
boy.setLastName( "Doe" );
CountryAttitude attitude = new CountryAttitude();
// TODO: doesn't work
attitude.setBoy( boy );
attitude.setCountry( country );
attitude.setLikes( true );
boy.getCountryAttitudes().add( attitude );
s.persist( boy );
s.getTransaction().commit();
s.clear();
Transaction tx = s.beginTransaction();
boy = (Boy) s.get( Boy.class, boy.getId() );
assertTrue( boy.getCountryAttitudes().contains( attitude ) );
s.delete( boy );
s.delete( s.get( Country.class, country.getId() ) );
tx.commit();
s.close();
}