I am getting the following generated sql when trying to insert into postgres which is throwing an error about the duplicated returning syntax. tried versions 5.8 and 5.8.1
Db.Insert(tblPoco, selectIdentity: true);
produces
INSERT INTO "tablename" (..fields...) VALUES (..values...) RETURNING "id" RETURNING "id"
This will pretty much show it, just needs a postgrse db
public class Test
{
[Fact]
public void Test1()
{
var dbFactory = new OrmLiteConnectionFactory(Config.PostgreSqlConfig.ConnectionString, new PostgreSqlDialectProvider());
using var db = dbFactory.OpenDbConnection();
db.DropAndCreateTable<TblDto>();
using (var capture = new CaptureSqlFilter())
{
db.Insert(new TblDto(), selectIdentity: true);
Console.WriteLine(capture.SqlCommandHistory.FirstOrDefault());
}
var id = db.Insert(new TblDto(), selectIdentity: true);
}
public class TblDto : IHasId<int>
{
[AutoId]
public int Id { get; }
}
}