@Test
public void canUpdateEntityAfterRemovalOfAssociationStoredInEntityOnInverseSide() {
Project project = createAndPersistProjectWithProjectGroup();
ProjectGroup projectGroup = project.getProjectGroup();
Transaction transaction = session.beginTransaction();
projectGroup.getProjects().remove( project );
project.setProjectGroup( null );
transaction.commit();
transaction = session.beginTransaction();
projectGroup.setName( "Fancy projects" );
transaction.commit();
transaction = session.beginTransaction();
projectGroup = (ProjectGroup) session.get( ProjectGroup.class, "project-group-1" );
assertThat( projectGroup.getName() ).isEqualTo( "Fancy projects" );
assertThat( projectGroup.getProjects() ).isEmpty();
transaction.commit();
}