Skip to content

public virtual async Task AlteringDocumentShouldUpdateReducedIndex() in CoreTest.cs #673

@xeron333

Description

@xeron333

I'm studying your YesSQL project and I'd like to report a problem in the test YesSQL.Tests :
public virtual async Task AlteringDocumentShouldUpdateReducedIndex()
The deletion function:

session.Delete(article); (line 2864)

doesn't work with both SQLite and SQL Server in LocalDB. With SQL Server, I get the following message:
Microsoft.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "tpFK_ArticlesByDay_Document_DocumentId". The conflict occurred in database "TestDb_Temp", table "TestDb_Temp.tpArticlesByDay_Document", column 'DocumentId'. The statement has been terminated.`
I tried modifying the constraint to "On Cascade" using a Temp database, but it's impossible; your model resets everything when the test starts. Do you have any ideas on how to make this test work?
Please keep me informed
Greetings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions