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)]

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web7909

  • 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