|
From: David De S. <ida...@gm...> - 2014-03-19 22:39:31
|
Good day,
I'm using version 4.1.0.0 for .NET 4.5/4.0 with Entity Framework support of
the Firebird ADO.NET Data Provider.
And I'm getting this exception when it shouldn't.
Let me further explain:
I have a table *Product*, with *Code* field which is unique and with DB
type as VarChar.
When I save a new Product with Code = "123" and then another one with Code
= "1234", I get an unique constraint exception.
As you can see, the *Code* is not the same but still the exception is
thrown.
I used those values literally. I also have tested with "1" and then "12"
and similar ones getting the same result.
I examined the exception and is indeed pointing to the Product.Code field.
This is part of the script generated for the DB:
CREATE TABLE "Product"
(
"Id" INTEGER NOT NULL,
"Code" VARCHAR(50) NOT NULL,
...
CREATE GENERATOR "SEQ_Product";
...
ALTER TABLE "Product"
ADD CONSTRAINT "PK_b975d4748fdb926b5f347dafb0a" PRIMARY KEY
...
ALTER TABLE "Product"
ADD CONSTRAINT "UC_de8f0404c97a0d1f3917002ab06" UNIQUE
(
"Code"
);
As an additional note, I'm using Firebird embedded, the latest version
found on the page.
Regards,
Dave
|