You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot insert to tables which have only one column #233
I have a table which have only one column: Id which is the primary key.
type [<Table("Test", Schema = "dbo")>] Test () =
[<property : PrimaryKey>]
member val Id = Unchecked.defaultof<int> with get, set
let e = Test()
let o = store.Set(typeof<Test>).Add e
store.SaveChanges() |> ignore
generates the following query, which is invalid
INSERT INTO "dbo"."Test"() VALUES () RETURNING "Id"
Ran into the same issue today on the current version from master.
I believe the proper syntax would be INSERT INTO "schema"."table" VALUES(default) RETURNING "Id"
Activity
CezarCretu commentedon Aug 4, 2014
Ran into the same issue today on the current version from master.
I believe the proper syntax would be
INSERT INTO "schema"."table" VALUES(default) RETURNING "Id"roji commentedon Aug 6, 2014
@CezarCretu, @asturel, this bug was fixed. Can you please try our 2.2-rc1 and confirm?
Emill commentedon Aug 6, 2014
It was fixed after rc1 was released?
Den 6 aug 2014 07:33 skrev "Shay Rojansky" [email protected]:
roji commentedon Aug 6, 2014
Sorry, I got confused here... thanks for noticing @Emill.
This fix isn't available yet in any release, although I think it will definitely be included in the final 2.2.
@CezarCretu, @asturel: you can download the binaries for the latest 2.2 branch (where this fix is merged) here: http://build.npgsql.org/viewLog.html?buildId=1849&buildTypeId=npgsql_all&tab=artifacts
CezarCretu commentedon Aug 6, 2014
It's fixed in the version you linked, thanks.
franciscojunior commentedon Aug 6, 2014
Yep. I already applied this patch to release-2.2.0 branch: 1c6e2d2
roji commentedon Aug 6, 2014
Great!