Skip to content

Saving Changes Fail After Adding New Record And Amending Primary Key Field #1049

@perahoky

Description

@perahoky

Details for the issue

I have a database with a table, generated by a nhibernate schema:

CREATE TABLE "ASD.Order" (
	"ID" integer PRIMARY KEY AUTOINCREMENT,
	"Nr" NUMERIC NOT NULL,
	"Version" INT NOT NULL,
	"Order" TEXT,
	"Article" NUMERIC NOT NULL,
	"Amount" NUMERIC,
	"TargetDate"	DATETIME,
	"Date2" DATETIME,
	"CustomerDate" DATETIME,
	"Info2" TEXT,
	"PreviousOrder" NUMERIC,
	"OrderType" TEXT,
        -- unneccessary
	-- FOREIGN KEY("Article") REFERENCES "ASD.Article"("ArticleNr"));

"Save changes" fails:

  • Select table "Order" in GUI
  • Insert a new Record using the "new record" button.
  • Edit the columns in the new record (ID, Nr, Order, Amount...)
  • Click "Save changes"
  • Click "reload" of the target table (Order)

Current Behaviour:

  • The data in the inserted record(s) dissappears

Expected Behaviour:

  • The data in the tables/records gets validated and saved in db-file.
    or
  • The save fails with a error message in a message box with information what's the corrupted data.

Useful extra information

The foreign keys are not important cause they are valid (the ArticleNr exists).

Maybe, it's because i change the ID-Column (autoincrement primary key).
When i insert a new record and change the ID, (following instructions above) the bug appears.

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: 8.1 64bit (updates installed)_ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.9.1
  • 3.9.0
  • Other: ___

I have also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions