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
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to