title: DBUnit - integrity constraint violation: foreign key no action; SYS_FK_10556
body: <p>I am currently coding test with dbunit(using hsqldb). However, I have a huge Problem at initializing the db:</p>
  
  <p>here`s the code:</p>
  
  <pre><code>/**
       * Init before a test starts
       */
      @Before
      public void initialise() {
          IDataSet dataSetRating = null;
          IDataSet dataSetMovie = null;
  
          log.info("enter init test");
  
          try {
              con = datasource.getConnection();
              icon = new DatabaseConnection(con);
              File rating = new File("./src/test/resources/startDatabaseRating.xml");         
              dataSetRating = new FlatXmlDataSetBuilder().build(rating);
              DatabaseOperation.CLEAN_INSERT.execute(icon, dataSetRating);
          } catch (Exception e) {
              e.printStackTrace();
              log.error(e);
              System.exit(-1);
          }
      }
  </code></pre>
  
  <p>my create statement looks like that:</p>
  
  <pre><code>CREATE TABLE Rating
  (
      rid INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
      mid INTEGER FOREIGN KEY REFERENCES Movie(movieId), 
      rating INTEGER NOT NULL, 
  );
  </code></pre>
  
  <p>and my startDatabaseRating.xml looks like that:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;dataset&gt;
      &lt;Rating rid="0" mid="0" rating="1" /&gt;
      &lt;Rating rid="1" mid="0" rating="2" /&gt;
      &lt;Rating rid="2" mid="0" rating="3" /&gt;
      &lt;Rating rid="3" mid="0" rating="4" /&gt;
  
      &lt;Movie movieid="0" title="Movie1" moviePath="C" /&gt;
      &lt;Movie movieid="1" title="Movie2" moviePath="D" /&gt;
  &lt;/dataset&gt; 
  </code></pre>
  
  <p>When I run the tests I get:</p>
  
  <blockquote>
    <p>java.sql.SQLIntegrityConstraintViolationException: integrity
    constraint violation: foreign key no action; SYS_FK_10556 table:
    RATING</p>
  </blockquote>
  
  <p>Why do I get this exception, cause there is still a dataset in the *.xml file. How to fix this problem?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre><code>CREATE TABLE Movie
  (
      movieId INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
      title VARCHAR(255) NOT NULL,
      moviePath VARCHAR(500) NOT NULL
  );
  </code></pre>