Hello,
I am at a point now implementing some user types, things are loading from the database correctly, I can work with the models, make adjustments via services and WPF UI views, view models, all that is working beautifully.
Now I am doing the last leg of the game plan: persisting back to the database, which as I can gather from the traces, StackOverflowExceptions, etc, revolves around negotiating Equals: A LOT, and a lot of navigation to and/or from assembed and/or dissassembled form factors. Which depending upon the user type implementation, can be tricky.
Which is part partial my question. What is the general expection, i.e. persistence 'protocol' from an NHibernate perspective, navigating the persistence conversation.
Our approach is also generally to implement a P or R based generic user type at base (i.e. primitive versus returned types), especially when we want to do things such as negotiate NodaTime constructs, sometimes also JSON based Newtonsoft.Json.Linq constructs; whch as I mentioned, works beautifully querying and loading from the database.
From what I can also determine, user types sometimes also cached, although from the lack of documentation, we are not hundred percent clear in which form, either P or R.
I've implemented the assembly and disassembly generally to use switch expressions with strategically placed pattern matching in order to isolate P from R in a broad range of use cases. But still finding a StackOverflow slip through the cracks here and there.
Overall, we are familiar with ORM in general, usually involving comparison between two datasets, so I'd guess minimally at a primitive level, but what is cached, the assembled version, and to make the apporpriate comparison that does not blow up the stack.
So I am here to ask the question: what sort of protocol, assy, disassy, caching, can we expect, negotiating the persistence sequence?
Thanks!
Best,
Michael W. Powell