iusertype

Preloading IUserType with values from webservice

余生颓废 提交于 2019-12-24 15:14:02
问题 This post: http://kennytordeur.blogspot.com/2011/04/nhibernate-in-combination-with_06.html Describes how to load an entity from a resource other than a database, in this case a webservice. This is great, but if I load a number of clients in one query, each with a different MaritialState, it will have to call the webservice for each Client. Is there a way to preload all marital states, so it doesn't have to go back and forth to the webservice for each client? 回答1: I don't think Hibernate

Why is Fluent NHibernate ignoring my convention?

断了今生、忘了曾经 提交于 2019-12-24 00:19:59
问题 I have a convention UserTypeConvention<MyUserType> where MyUserType : IUserType where MyUserType handles an enum type MyEnum . I have configured Fluent NHibernate thusly sessionFactory = Fluently .Configure() .Database(MsSqlConfiguration.MsSql2005.ConnectionString( c => c.Is(connectionString)) ) .Mappings( m => m .FluentMappings .AddFromAssemblyOf<A>() .Conventions .AddFromAssemblyOf<A>() ) .BuildSessionFactory(); where A is a type in the same assembly as UserTypeConvention<MyUserType> and

NHibernate: Many-to-one IUserType

帅比萌擦擦* 提交于 2019-12-11 10:47:48
问题 Following on from this question: NHibernate: Lazy loading of IUserType Seeing as I can't lazy load a property or a one-to-one relationship, is there a way I can use an IUserType with a many-to-one? Something like this (which doesn't work): <many-to-one name="Client" column="`ClientId`" lazy="true" type="EmployeeSystem.UserTypes.ClientUserType, EmployeeSystem" /> 回答1: Looks like NHibernate does not support custom loading ( IUserType ) for associations (many-to-one, one-to-one etc). As a side