org.sqlite.MetaData.getExportedKeys constructs incorrect SQL

Issue #46 resolved
Greg Shrago
created an issue

Assuming the following DDL:

create table REFERRED (ID integer primary key not null);

create table REFERRING (ID integer, RID integer, foreign key (RID) references REFERRED(id));

org.sqlite.MetaData.getExportedKeys for REFERRED table throws:

java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near ")": syntax error)

at org.sqlite.DB.newSQLException(

at org.sqlite.DB.newSQLException(

at org.sqlite.DB.throwex(

at org.sqlite.NativeDB.prepare(Native Method)

at org.sqlite.DB.prepare(

at org.sqlite.Stmt.executeQuery(

at org.sqlite.MetaData.getExportedKeys(

Comments (4)

  1. Vasyl Khrystiuk

    sorry my bad

    I've got same error but reasone was realy another - it was related to hibernate. I do not know if it's hibernate, problem or this driver? but i just put my working test project here and you cen look yourself on problem

    In attached project i have two entities: "User" and "Track" Thay are simular BUT "Track" has none fields except id. And this cause hibernate fall:project

  2. Log in to comment