Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless errors while working with tables with composite FK #29326

Open
E1izabeth opened this issue May 3, 2024 · 1 comment
Open

Endless errors while working with tables with composite FK #29326

E1izabeth opened this issue May 3, 2024 · 1 comment

Comments

@E1izabeth
Copy link
Member

E1izabeth commented May 3, 2024

Description

  1. Create tables (example was taken from https://www.sqlite.org/foreignkeys.html)
CREATE TABLE album(
  albumartist TEXT,
  albumname TEXT,
  albumcover BINARY,
  PRIMARY KEY(albumartist, albumname)
);

CREATE TABLE song(
  songid     INTEGER,
  songartist TEXT,
  songalbum TEXT,
  songname   TEXT,
  FOREIGN KEY(songartist, songalbum) REFERENCES album(albumartist, albumname)
);
  1. Open References panel
  2. Press insert new row button
    image
  3. Get error on any action after that
    image
!ENTRY org.jkiss.dbeaver.model 4 0 2024-05-03 19:55:24.464
!MESSAGE Entity [song] association [SONG_FK1] columns differ from referenced constraint [MYALBUM_PK] (1<>2)
!STACK 0
org.jkiss.dbeaver.DBException: Entity [song] association [SONG_FK1] columns differ from referenced constraint [MYALBUM_PK] (1<>2)
	at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer.navigateReference(ResultSetViewer.java:3595)
	at org.jkiss.dbeaver.ui.controls.resultset.panel.references.ReferencesResultsContainer$4.run(ReferencesResultsContainer.java:422)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:115)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

DBeaver Version

DBeaver 24.0.4

Database and driver

image

@E1izabeth
Copy link
Member Author

I get this bug trying to reproduce #29309
I suppose these issues should be solved together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant