Mapped types with events

4 views
Skip to first unread message

Michael W Powell

unread,
Jun 5, 2025, 11:19:51 PMJun 5
to Fluent NHibernate
Hello,

How do I work with events in mapped types. Do I need to specially instruct the mapping to otherwise ignore those events? What is the alternative? Declare add and remove clauses virtual?

Best, thank you,

Michael W. Powell

Michael W Powell

unread,
Jun 6, 2025, 11:08:01 AMJun 6
to Fluent NHibernate
I think I somewhat have it sorted. But I find it is a deficiency of CommunityToolkit.Mvvm the ObservableObject. And I do not really want to get into the constroversy over DTO to the database and what not. That's not what this is. We're talking about hydrating models, from the ground up.

OO implements the INPC pattern among other things, allows for nice setting of properties, which I think is a huge plus, does not change a prop value unless it has  to. Which in ORM and NH or EF terms, also means not upserting when it does not see a change.

Anyway the events are not implemented virtual. I tried new virtual in my classes, to no avail since apparently somehow the first declaration of the event is winning.

So I may either look at an Mvvm PR if possible, or just implementing my own virtual version.

Of course, if I can disable lazy loading, which I do not necessarily need or want, then perhaps that is a non issue, yes?

Best...

Michaael W. Powell

Reply all
Reply to author
Forward
0 new messages