sqlite-net icon indicating copy to clipboard operation
sqlite-net copied to clipboard

There is no FK Attribute support!

Open shaman4k opened this issue 13 years ago • 8 comments

Foreign Key Constraints are vital feature of any ORM.

  1. Class Column: need to be added FK property && colAttribute like [Association(TableName = "ACCOUNT"].
  2. Class TableMapping shoud implement FK supporting
  3. Class ORM should implement new case like "p.IsFK" and decl like "REFERENCES ACCOUNT"

After that implementation we can get creating tables with FK. So Second part of modification must be geting data with joins due FK.

shaman4k avatar Sep 01 '12 19:09 shaman4k

Is there any update or plan for FK support? What about support for table relationships? (one to many/many to many, etc) Thanks in advance,

devotionsolutions avatar May 24 '18 19:05 devotionsolutions

any news?

felixclase avatar Dec 23 '19 18:12 felixclase

SQLite states that foreign keys are disabled by default, what if we pass these options

"PRAGMA foreign_keys = true"

as

var options = new SQLiteConnectionString(databasePath, true, somekey, preKeyAction: db => db.Execute("PRAGMA foreign_keys = true"));

Will it work?

Zujaj avatar Jan 01 '20 14:01 Zujaj

@praeclarum When will Foreign Key be introduced?

Zujaj avatar Jan 10 '20 13:01 Zujaj

wow, 9 years and counting lol.

castrojr913 avatar Feb 02 '20 15:02 castrojr913

Any progress? 11 yeas now 😂

rainyl avatar Aug 27 '23 14:08 rainyl

Bruh 11 years have passed 🤣

echolumaque avatar Aug 31 '23 07:08 echolumaque

still nothing? why?

flangopink avatar May 29 '24 14:05 flangopink