NHibernate mappings

16 views
Skip to first unread message

Michael Powell

unread,
Jun 1, 2025, 6:27:42 PMJun 1
to Noda Time
Hello,

Question, vis-a-vis NHibernate, and Fluent, FNH, NH, does anyone happen to know if there is a project or package out there doing analogous things as the efcore dialectic pg adapter? i.e. things like handling Duratoin to Interval conversions.

If not, what would an IUserType custom type look like, per se? In other words, how to map from Duration to "Interval" quote unquote in CSharp language level terms.

Thanks!

Best,

Michael W. Powell

Michael Powell

unread,
Jun 2, 2025, 12:48:46 AMJun 2
to noda...@googlegroups.com

So far what I've been able to come up with with some chat assistance, in terms of the PrimitiveType themselves up to and including the pg dialect, makes some sense.

However, now about adding to an NH Configuration, I do not see a way of doing that, could someone please educate me as to how that is done.

The following code was chat generated, but I do not think it is correct. Is presumes existing of some  TypeDefinitions meta data, but that does not exist, if it ever did. Additionally the TypeMapping is an internal construct, which again, given that, does not make a lot of sense except perhaps to keep the args straight.

private static void RegisterTypeMapping(this Configuration configuration, TypeMapping mapping)
{
    var typeRegistry = configuration.TypeDefinitions;
    typeRegistry[mapping.Type] = mapping;
}

Assuming it was ever a dictionary, why would it except a generic or user specific weakly typed object.

Confused how to connect the dots with NH at an internal level.

Best, thanks!


--

---
You received this message because you are subscribed to a topic in the Google Groups "Noda Time" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/noda-time/5G6YIgPnbSo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to noda-time+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/noda-time/df69df74-ebfc-42a8-95ae-1cedca0d9a21n%40googlegroups.com.

Jon Skeet

unread,
Jun 2, 2025, 2:15:31 AMJun 2
to noda...@googlegroups.com
I'm afraid I don't think any of the maintainers have any experience with this.

There are a few NHibernate + Noda Time packages around, but it doesn't look like any of them have been updated for quite a while.

I suspect that you may have more luck in NHibernate community lists/groups/etc - I'd expect the degree of required knowledge of NHibernate to be significantly more than the degree of knowledge with Noda Time. (In other words, an NHibernate expert could probably learn all they need to about Noda Time for this in a matter of a few hours; I doubt that the reverse is true.)

Jon


--

---
You received this message because you are subscribed to the Google Groups "Noda Time" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noda-time+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages