Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1942

Duplicate PK encountered when using a ApplyScriptBefore script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
    • None
    • Hide

      Run a unit test using the @ApplyScriptsBefore

      Show
      Run a unit test using the @ApplyScriptsBefore

      I am trying to create tests for hibernate under WildFly 8.2.0.
      I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.

      I encounter this error for specific primary keys. For example 1.
      If i run the same script (only with an id of 2) multiple times it works.

      I have tested the same thing using yaml and json formats and it doesn't work either.

      INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
      INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
      INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
      INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);

            bartosz-1 Bartosz Majsak
            sm0ke_jira Dimitrios Kordas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: