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

"The given key was not present in the dictionary" #334

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

"The given key was not present in the dictionary" #334

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Add a Foreign Key to a SQLite database
2. DbMetal /provider:Sqlite /conn "Data Source=bms4.db3" /dbml:Model.dbml

I am getting this error:
>>> Reading schema from SQLite database
DbMetal: The given key was not present in the dictionary.

What version of the product are you using? 0.20.1
On what operating system? Windows XP

This is my SQLite database

CREATE TABLE [Categories] (
  [ParentId] INT, 
  [Name] VARCHAR(100));


CREATE TABLE [Fees] (
  [CategoryId] INT, 
  [Name] VARCHAR(100), 
  [Value] VARCHAR(50), 
  [Info] VARCHAR(200));


CREATE TABLE [Markups] (
  [CategoryId] INT, 
  [UpTo] MONEY, 
  [Value] VARCHAR(50), 
  [Info] VARCHAR(200));

That will create the .dbml file successfully.
But once you add a Foreign Key to [Fees], DBLinq will fail
(I have made the FK name lowercase as suggested by others)

CREATE TABLE [Fees] (
  [CategoryId] INT CONSTRAINT [fk_fees_categories] REFERENCES [Categories]([rowid]), 
  [Name] VARCHAR(100), 
  [Value] VARCHAR(50), 
  [Info] VARCHAR(200));

Could someone help me please?

Original issue reported on code.google.com by [email protected] on 8 Nov 2012 at 6:34

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

No branches or pull requests

1 participant