System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 3fa5ed095cb3e6d2bfb2b47900eaf67aa1e0b9a1
Title: when i have a self relationship in the edmx, i get an error in the insert
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: LINQ Resolution: Unable_To_Reproduce
Last Modified: 2013-01-31 07:47:14
Version Found In: 1.0.83.0
User Comments:
anonymous added on 2013-01-23 16:32:52: (text/x-fossil-plain)
I have a SQLite database with a table that have a self relationship:

Persons(IDPerson, IDParant, ...)

When I try to set the IDParent field, I get an error that says "sql logic error or missed database. @p0..." (I don't remember the exact an complite message).

If this field is null there is no problem, but when I set a value, I get the error.

I know that problem is in the edmx model because if I use for example the application SQLite Expert I can insert a register in which I set this field, and if in my database I delete the FK relationship and create again the edmx model in visual studio, then I have no problems.

However I would like to use this FK constraint, baceuse I would like that if I delete a parent, set to null all his childrens.

mistachkin added on 2013-01-23 19:36:50: (text/x-fossil-plain)
In order to investigate this, I'll most likely need to know some more information:

1. The schema of the database.
2. Some C# example code that demonstrates the problem.

anonymous added on 2013-01-24 08:35:15: (text/x-fossil-plain)
How can I send you the schema and the code? do you prefer the code source of a single application that has the problem? where could I send you the source code of this application?

anonymous added on 2013-01-24 08:37:56: (text/x-fossil-plain)
I see that I can attach files. then I prepare a small examle and attach the source code.

anonymous added on 2013-01-24 09:51:41: (text/x-fossil-plain)
I can't reproduce the problem in a small application, in this case works fine.

If I reproduce the problem I attach the example, but by the moment I can't.