Supporting pg timestamp and NodaTime etc

8 views
Skip to first unread message

Michael W Powell

unread,
Jun 3, 2025, 12:27:47 PMJun 3
to Fluent NHibernate
Hello,

I am reviewing pg, NodaTime, and FNH docs, for mappings supporting Duration, Instant, probably couple of others, but those are the major ones.

As far as I know, Duration maps to pg interval. Generally analog to dotnet TimeSpan.

What is the NH analog for pg timestamp? Generally analoy of dotnet DateTime, DateTimeOffset. Databases are usually created with data types TIMESTAMP WITH TIME ZONE clauses.

In terms of NH PrimitiveType Instant what should we be doing for PrimitiveClass and ReturnedClass? There are no comments there, so it is difficult to say. Best guess is types of TimeSpan and Duration, respectively; or DateTimeOffset and Instant, respectively. Or DateTime, perhaps, rather than DateTimeOffset.

Then how do I teach NH (FNH) how to treat those types at a fundamental level? Or do the maps, types, etc, all get magically reflected into FNH?


As well as comparison with efcore.


Best,

Michael W. Powell

Michael W Powell

unread,
Jun 3, 2025, 3:57:34 PMJun 3
to Fluent NHibernate
Question, is there anything more recent than PostgreSQLConfiguration.PostgreSQL83, is that for what, pg 8.3?! Will that be sufficient?! Right now ATM we are talking about at least pg 16+, which I have installed presently.

Michael W Powell

unread,
Jun 3, 2025, 3:59:09 PMJun 3
to Fluent NHibernate
To qualify that concern, I do not care that much about doing any FNH generated database migrations, only for the basic ORM tasks, structuring appropriate queries, joins, etc, projections and models and such. So dialect-wise, would there need to be any pg updates?
Reply all
Reply to author
Forward
0 new messages