@Test
  public void testFindStageByHostRole() {
    ormTestHelper.createStageCommands();
    List<HostRoleCommandEntity> list = hostRoleCommandDAO.findByHostRole("test_host1", 1L, 1L, Role.DATANODE.toString());
    assertEquals(1, list.size());
  }
to clarify: are cascade operations allowed?
ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java