Permalink
Browse files

Fixed Insert Command for PostgreSQL

  • Loading branch information...
1 parent 8a514ee commit 6176751659338e5ea5631d800077d44eea4d9396 @kcprogrammer kcprogrammer committed Jul 14, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 Massive.PostgreSQL.cs
View
@@ -597,8 +597,7 @@ public virtual dynamic Insert(object o)
{
var cmd = CreateInsertCommand(ex);
cmd.Connection = conn;
- cmd.ExecuteNonQuery();
- cmd.CommandText = " returning {0} as newid ";
+ cmd.CommandText += String.Format(" returning {0} as newid ", PrimaryKeyField);
ex.ID = cmd.ExecuteScalar();
Inserted(ex);
}

0 comments on commit 6176751

Please sign in to comment.