Re: NHibernate.Search build (second attempt)
"Kailuo Wang" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
ISynchronization was proposed by me through a patch. it was a mimic to the Synchronization interface in JTA, Hibernate.Search use it to register tasks to be performed when Hibernate transaction commits ( before it was using interceptors but we switched to event listeners) On Tue, Jun 10, 2008 at 12:26 AM, Fabio Maulo <[email protected]> wrote: > I really don't understand all this matter. > ISynchronization was added on the trunk and, so far I don't study it > (probably it is a part of the work aroud ADOContext and TransactionContext > started some month ago in trunk). > > The CriteriaClass is a "no problem" : > Type entityType = > ((ISessionFactoryImplementor)sessionFactory).GetEntityPersister(criteria.EntityOrClassName).GetMappedClass(EntityMode.Poco); > > this is code line that give you the same result of CriteriaClass. > > So far we don't touch ICriteria so deep.... > Take care with it because, for example, > public CriteriaImpl(System.Type persistentClass, ISessionImplementor > session) > not exist in H3.2.5 because from now to future we can talk about <entity> > without reference to its concrete implementation... > > Would you like to have something like > <class name="AGenericClass{T='int', TR='MyNameSpace.MyClassX, MyAssembly'}" > table="FirstEntityA" entity-name="FirstEntityA"> > and > <class name="AGenericClass{T='string', TR='MyNameSpace.MyClassZ, > MyAssembly'}" table="SecondEntityA" entity-name="SecondEntityA"> > ? > > What you are going to query is > session.CreateCriteria("FirstEntityA"); > or > session.CreateCriteria("FirstEntityA"); > or > session.CreateQuery("from FirstEntityA"); > etc. > > In H3.2.5 they don't use entity-name in this way but, because entity-name > is an abstraction from the concrete class, we can use it to support > generic-entity too so: > we are working in NH porting Hb feature in a way we are think will be > useful for all. > I can understand that it should be not so clear for all users because a > deep knowledge of NH code-base is needed. > > If the problem for NH.Search with NH2.0.0 branch is ISynchronization, and > it is indispensable to release NH.Search, the right way is port > ISynchronization in NH2.0.0Alpha1 (at the end "some" of NH committers are > the same of NH.Contrib so we can talk about what is useful, what no and > why). > > Please Oren or Dario (who are working on ADOContext and TransactionContext) > port ISynchronization to NH.2.0.0Alpha1 if it is indispensable to release > NH.Search together with NH2.0.0GA. > > Thanks. > Fabio Maulo. > > 2008/6/9 Felix Gartsman <[email protected]>: > >> Hello, >> I've made a few private modifications to the NH code-base and want to >> compile NHibernate.Search from the NHContrib trunk against it. But nor the >> NH trunk, nor the NH 2.0.x branch can be used. The trunk removed >> CriteriaClass, and the branch lacks ISynchronization. Before CriteriaClass >> removal I used a modified NHibernate.Search for the trunk build, but now >> of >> course it is not enough. If trunk is 2.1 and branch lacks ISynchronization >> it means NHibernate.Search won't support the 2.0 release. Will >> ISynchronization be back-ported to the branch? I saw a post how to get >> CriteriaClass from trunk's ICriteria, so the trunk can be probably used, >> but >> not the branch which I would prefer for now. >> >> Felix. >> > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Nhibernate-development mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nhibernate-development > > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Nhibernate-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development