Hi!
It's me again.
I'm suffering with error of incompatible type casts of time without timezone with new version of npgsql and yours PostgreSQL DB driver.
We have a two field TimeFrom and TimeTo, wich have time without timezone PostgreSQL type.
CREATE TABLE script contains this fields definition like:
...
timefrom time without time zone,
timeto time without time zone,
...
So with new version, npgsql now casts this type to timespan:
http://www.npgsql.org/doc/migration-3.0.html
[...]
* NpgsqlTime has been removed and replaced by the standard .NET TimeSpan.[...]
But LLBLGEN still tries to cast it to .Net System.DateTime! If in LLBLGEN project I trying to change field type in Entity Mapping i'll getting an error:
Message type: Error
Message text: The mapping of sub-element 'TimeFrom' of entity 'sys.OperationTime' for the target database with the driver 'PostgreSql 7.4+ Driver (Npgsql)' has the following errors:
- TypeConverterToUse: The .NET types of the mapped element field and the target field aren't the same/compatible, so a type converter is needed.
If I didn't change field mappings manually, I'm getting "System.InvalidCastException occured" in Entity field getter:
get { return (Nullable<System.DateTime>)GetValue((int)OperationTimeFieldIndex.TimeFrom, false); }
In quick watch without casts to DateTime i see that GetValue returns TimeSpan object. See attachment for this.
Can you add type mapping for this or something else to fix this?