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
Foreign key references could not be found in any import warning (when upgrading Drift 2.1.0 -> 2.4+) #2433
Comments
Here is a minimal example: testdb.dart
tables.dart
language.dart
topic.dart
video.dart
This will generate the following error in Drift 2.4+, but is fine in 2.1.0:
|
Thanks for the report and for the helpful example! First, you can safely ignore the error - the only reason it's there now is because older drift versions didn't try to analyze the constraints at all, but it doesn't have any impact on the generated code. The direct import in your example should work with 451bc9c, so this will be fixed in the next |
We've been using custom constraints on several of our tables to add composite foreign keys for some time without issue. However, when attemping to upgrade Drift, new builds display the following warning(s) for all tables that use these constraints:
Here is the table that generated the above warning (unsplitting the constraint string results in the same):
Below is the Topic table that the Video table (and others) could previously find without issue. This class itself also cannot find the categories table either, but the standard reference to Languages works fine.
We've tried adding various imports (e.g. to other tables and/or the main Drift database class) into each table to no avail.
The text was updated successfully, but these errors were encountered: