java.sql.SQLException

Primary or unique constraint required on main >> table: >> > VOTERS in statement [-- creating foreign key constraint >> > absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT >> > absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES >> > voters (id)]

Solutions on the web7917

  • via empire-user by Francis De Brabandere, 9 months ago
    Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  • via empire-user by Joel Becker, 1 year ago
    Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  • via empire-user by Rainer Döbele, 9 months ago
    Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  • Stack trace

    • java.sql.SQLException: Primary or unique constraint required on main >> table: >> > VOTERS in statement [-- creating foreign key constraint >> > absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT >> > absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES >> > voters (id)] at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    11 more bugmates