Can't insert records with TIMESTAMP fields in MariaDB using MySQL (Pomelo) Provider
I'm having this issue using the MySQL (Pomelo) provider (latest version but tried older ones as well).
I'm using 10.1.48-MariaDB-0+deb9u2 as a database, and created a test table with only 3 fields:
Testtabel - ID (INT - autogenerated) - created_date_time (DATETIME) - created_timestamp (TIMESTAMP)
and just execute the following code:
Testtabel.Add(new Testtabel(){ CreatedDateTime = DateTime.Now, CreatedTimestamp = DateTime.Now }); SaveChanges();
Sadly, the result is not what I would expect, as the created_timestamp field is empty:
What could be causing this? Is there a bug in LinqPad or in the provider? Am I doing something incredibly stupid or wrong?
Comments
I've tested adding the data using the same MySqlConnector library that Pomelo is using and everything seems to be working fine: