tmsmith/Dapper-Extensions — Issue #26: Id only mapped to int (fails with bigint)
Author: clevinas
Created: 2012-01-17 14:06:49+00:00
State: open

In function AutoMap(), 'Id' is set to identity 'only' if its type is int. I tested my tables with bigint (just in case), and discovered that the identity flag doesn't get set. Instead, the property is set to assigned, which causes an insert into the DB to fail because 'Id' is also passed along in the query. Insert(..., T Entity) is also casting the 'Id' to int.

-Great extension otherwise. It worked without glitches until I tried this. I reverted back to int, but thought you might want to know. Thanks!