3/17/2024 0 Comments Nhibernate mapproxyIt feels that this should just be an attribute on the property I don't want to map. I would like to keep the very simple behaviour of CurrentState in my model class, and prevent NHibernate from over-reaching itself and trying to map/proxy this property. When working with detached entities (from another session), sometimes, at seemingly random places, NHibernate will throw a NonUniqueObjectException. GetCurrentState should be 'public/protected virtual' or 'protected This started out as a support question, but it is an interesting enough (and general enough) that I think it is important to make sure that it is recorded. Return Transitions.OrderBy(q => q.TransitionTimeStamp).LastOrDefault() I tried to be cheeky and convert this to a method: public IWorkflowActivityInstanceTransition GetCurrentState() NHibernate.InvalidProxyTypeException: The following types may not beįB.: methodĬurrentState should be 'public/protected virtual' or 'protected Therefore: WorkflowActivityInstance q.TransitionTimeStamp).LastOrDefault() } The transitions are mapped in a Transitions property fine. I have a class, WorkflowActivityInstance which has a collection of WorkflowActivityInstanceTransitions which represents the transitioning of the state of the workflow. NHibernate.Spatial is a library of spatial extensions for NHibernate, and allows you to connect NHibernate to a spatially enabled database and manipulate geometries in Linq or HQL using NetTopologySuite, providing you with a fully integrated GIS programming experience. I am searching around for a solution to my problem but all I get is the reasons this does happen as opposed to preventing if from happening.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |