2013/2/12 Rory Plaire <[email protected]>: > If the 'ordered' mapping is the only feature depending on a collection > currently implemented by Iesi code, what about just create a custom > collection in NH which provides the needed behavior? I can understand the > initial justification for adopting a dependency on a collection library when > NH was first ported, but for a single dependency doesn't it make sense to > just provide the implementation internally?
I thought about that before I did Iesi 4.0, and eventually decided against incorporating it. The collection class (LinkedHashSet) itself is and should be independent of the rest of NHibernate. It could be useful outside of NHibernate. Also, if you are going to use a set with order-preserving characteristics, I thought it likely that you want your domain layer etc. to use the LinkedHashSet when creating collections, to preserve ordering also on that level. I did not want to force a direct reference to NHibernate in such cases. I think there might be some internal use of ReadOnlySet and SynchronizedSet too, but those can be handled differently of course. /Oskar > > > On Tue, Feb 12, 2013 at 9:32 AM, Oskar Berggren <[email protected]> > wrote: >> >> 2013/2/12 Roger Kratz <[email protected]>: >> > · In some thread, which I can’t find at the moment, I got the >> > impression that NH should drop support for all its non-generic >> > collections >> > in v4? >> >> It's still planned for 4.0. >> https://nhibernate.jira.com/browse/NH-3345 >> >> >> > · (Too late) I’ve seen there’s been discussions on this list how >> > to >> > handle OrderedSet when going for BCL’s ISet. FWIW, I think you should >> > drop >> > Iesi.Collections all together from Nh Core. My guess is that users using >> > OrderedSet are quite few and for users using it, there are great >> > extension >> > points in NH to do this on their own (or let the community build a 3rd >> > party >> > lib for this). >> > I vote for simply drop orderedset support from >> > DefaultCollectionTypeFactory >> > to get rid of Iesi.Collection dependency all together. But I guess this >> > decision is already made? >> >> >> I don't think this idea was discussed and rejected. The use for Iesi >> 4.0 in NH is really narrow, so it's tempting to remove it. >> >> One complication is that the mapping syntax has the "ordered" >> attribute. What should we do if the developer specifies this for a >> set-collection (to follow the principle of "easy to get it right, hard >> to get it wrong")? I suppose we can refuse to accept such a mapping >> unless the user has also specified a custom collection type? >> >> Then we could package an "official contrib" with the Iesi integration. >> >> /Oskar >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "nhibernate-development" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > > --- > You received this message because you are subscribed to the Google Groups > "nhibernate-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
