Dear Nikita,
Thank you for this workaround, it seems to work.
> Just checked dbimport with sqlite, seems like driver still skips part
> of the information about foreign keys (or rather quite strictly
> follows the definition of the table).
I don't think it is an issue with the driver. I think
Hi,
Just checked dbimport with sqlite, seems like driver still skips part
of the information about foreign keys (or rather quite strictly
follows the definition of the table).
Primary key name is missing in the FK metadata in particular if FK
references table without defining PK name explicitly.
> IIRC the issue on Cayenne side was with SQLite JDBC driver not bringing over
> the FK metadata during DB import. Again, this was years ago.
It must have been a long while ago.
If I use it from DBeaver, I do get all the foreign keys, so the JDBC
driver has been fixed by now.
Ali
> On Jul 22, 2022, at 3:56 PM, Ali Baharev wrote:
>
> FKs have been supported since at least 2009. It does have a well
> documented quirk though: You must enable foreign key support
> explicitly.
>
> 2. Enabling Foreign Key Support
> https://www.sqlite.org/foreignkeys.html#fk_enable
>
Dear Andrus,
Thank you for your prompt reply.
> Last time I checked, SQLite driver didn't support FKs. But this was a long
> time ago, so who knows :)
FKs have been supported since at least 2009. It does have a well
documented quirk though: You must enable foreign key support
explicitly.
2.
Last time I checked, SQLite driver didn't support FKs. But this was a long time
ago, so who knows :)
Derby would certainly support FKs, and the driver is pretty solid.
Andrus
> On Jul 22, 2022, at 3:24 PM, Ali Baharev wrote:
>
> Hi,
>
> I am trying to use cdbimport with the attached toy
Hi,
I am trying to use cdbimport with the attached toy SQLite database.
The pom.xml file and the log file are also attached.
My tables are imported but Cayenne 4.2.RC1 does not recognize any of
the foreign key constraints. In other words: I can import the tables
but their relationships are lost.