Hi Alexander, Thanks for your explanation. Sure - I’ll solve it some other way.
Cheers Roger From: nhibernate-development@googlegroups.com <nhibernate-development@googlegroups.com> On Behalf Of Alexander Zaytsev Sent: den 4 december 2018 00:27 To: nhibernate-development@googlegroups.com Subject: Re: [nhibernate-development] NHibernate 5.2.0 released Hi Roger, Historically the NHibernate ProxyFactory was an adaptation of LinFu Proxy. LinFu Proxy is general purpose proxy factory, which brings the overhead we do not need. This overhead comprises both performance, functionality and bugs. The decision has been made to replace a general purpose proxy factory with a highly specialized, highly optimized proxies built for purpose. Doing so we were able to get an 25-30% execution time improvement and half the memory footprint on certain datasets. That has been done in 5.1. In 5.2 Frédéric has implemented lazy properties proxies using the new approach, and so DynamicProxy factory become not needed anymore and therefore obsoleted. Because the new logic is highly specialized it is not reusable. I would suggest you to implement own proxy factory. I've checked the Envers code and found that potential proxy factory could be required only for user collections, but for other components you do not even need proxies and can go away with coded solution. Best Regards, Alexander On Tue, Dec 4, 2018 at 4:02 AM Roger Kratz <roger.kr...@teleopti.com<mailto:roger.kr...@teleopti.com>> wrote: Hi! First and foremost – great work! Historically Envers has used (and is using) NH Core’s ProxyFactory to create proxies. That type has now been marked as obsolete and some of the new types used seems to be internal. My guess is that this is made just to prevent what Envers is doing – reusing NH Core’s proxy logic? That sort of makes but on the other hand is Envers needs _very_ close to how NH Core is creating proxies (lazy loading etc.). Currently, thanks to “internal” NH Core proxy logic/code, not much logic for this is needed in Envers itself, a small proxy factory and two small interceptors, https://github.com/nhibernate/nhibernate-envers/tree/master/Src/NHibernate.Envers/Entities/Mapper/Relation/Lazy/Proxy<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnhibernate%2Fnhibernate-envers%2Ftree%2Fmaster%2FSrc%2FNHibernate.Envers%2FEntities%2FMapper%2FRelation%2FLazy%2FProxy&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=%2B5GRYIwp063rjlw9fQXItct1vPiO2%2FnjGdwWIUANxpk%3D&reserved=0> What are your opinions about this? The code structure changes you did regarding proxies, what was the purpose of that? Would it be possible to have some “way in”, creating proxing through NH Core? Cheers, Roger From: nhibernate-development@googlegroups.com<mailto:nhibernate-development@googlegroups.com> <nhibernate-development@googlegroups.com<mailto:nhibernate-development@googlegroups.com>> On Behalf Of Frédéric Delaporte Sent: den 3 december 2018 12:28 To: nhibernate-development <nhibernate-development@googlegroups.com<mailto:nhibernate-development@googlegroups.com>> Subject: [nhibernate-development] NHibernate 5.2.0 released NHibernate 5.2.0 is now released. For a list of resolved issues & pull requests, see the milestone<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnhibernate%2Fnhibernate-core%2Fmilestone%2F14%3Fclosed%3D1&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=AkYutaA09WIreTrqtsTLQe3mgzRiGX10xXmlGtiydMw%3D&reserved=0> or the release notes<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnhibernate%2Fnhibernate-core%2Fblob%2F5.2.0%2Freleasenotes.txt&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=QgwLe6uVqcfP7%2Fa4u3td%2Bzw0aWvrG1rtoPLofg%2F9q%2BM%3D&reserved=0>. Binaries are available on NuGet and SourceForge: https://sourceforge.net/projects/nhibernate/files/NHibernate/5.2.0/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fnhibernate%2Ffiles%2FNHibernate%2F5.2.0%2F&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=BhTzgCToLILcu%2FFHq4V3WjXFp1kVaaNo4HQWv7NjHFY%3D&reserved=0> https://www.nuget.org/packages/NHibernate/5.2.0<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FNHibernate%2F5.2.0&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=jndqeOk3o8SVaR%2Bp2Nmu7z41ZH5uNCoYcz9XPzx86GQ%3D&reserved=0> 157 issues were resolved in this release. ##### Possible Breaking Changes ##### * Mappings mixing column elements and formula elements were taking into account only the formula elements. They will now take into account all elements. * Mappings mixing column elements and/or formula elements with a column attribute or a formula attribute were silently ignoring the attribute. They will now throw. * Mappings mixing a column attribute and a formula attribute were silently doing some best effort logic, either considering this as a two columns mapping, the second one being the formula (most cases), or only taking into account the formula (case of the `<element>` mapping). They will now throw. * NHibernate `StringType` has gained case-sensitivity and culture parameters. Previously it was ignoring parameters. This type may change its behavior for any mapping having defined parameters for this type. See #1833. * Mapping a dynamic component with a `Hashtable` property instead of an `IDictionary` is no more supported. * Querying a dynamic entity as a `Hashtable` instead of an `IDictionary` is no more supported. * With PostgreSQL, a HQL query using the bitwise xor operator `^` or `bxor` was exponentiating the arguments instead. It will now correctly apply the xor operator. (`#` operator in PostgreSQL SQL.) * Auto-generated constraint names will not be the same than the ones generated with previous NHibernate versions under .Net Framework. (Under .Net Core those names were anyway changing at each run.) The new ones will be the same whatever the runtime used for generating them. * Some generated PK names may change, if a table name has a quoting symbol at precise 13th character. * The `WcfOperationSessionContext` has been removed from .Net Core and .Net Standard builds. See #1842. * Some classes, which were not serializing the session factory, do now serialize it. In case of cross-process serialization/deserialization, these session factories will need to be properly named, by setting the `session_factory_name` setting in the configuration used to build them. This may mainly affect users of a distributed second level cache, if their cache implementation uses binary serialization. Affected classes are: `CacheKey`, `CollectionKey`, `EntityKey` and `EntityUniqueKey`. * Some types cache representations have changed. Out-of-process second level caches should be cleared after upgrading NHibernate, if some of those types were cached. The concerned types are: `CultureInfoType`, `TypeType`, `UriType`, `XDocType`, `XmlDocType`. * `Dialect.GetIdentitySelectString` was called by the entity persisters with inverted parameter values: the table name in the column parameter, and the column name in the table parameter. No built-in dialects were using the parameter values. External dialects which were using it inverted (causing issues to collection persisters, which have always supplied them correctly) needs to be accordingly adjusted. * Users providing through an `IObjectFactory` some custom logic for instantiating value types will now need to supply their own result transformer if they were using `AliasToBeanResultTransformer` with value types, or their own entity tuplizer if they were using value types as entities. * Users providing through an `IObjectFactory` some custom logic for instantiating their custom session contexts will have to implement `ICurrentSessionContextWithFactory` and add a parameterless public constructor to their custom context, and move their custom instantiation logic from `IObjectsFactory.CreateInstance(Type, object[])` to `IObjectsFactory.CreateInstance(Type)`. * Various *Binding classes of NHibernate will now always have their protected dialect field null. (These classes are not expected to be derived by users, as there is no way to use custom descendants with NHibernate.) * `AbstractPersistentCollection.AfterInitialize` does no more perform queued operations. Queued operations are now run by a later call to a new method, `ApplyPendingOperations`. Concrete custom implementations relying on the queued operations to be done by their base `AfterInitialize` will need to be changed accordingly. -- --- 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 nhibernate-development+unsubscr...@googlegroups.com<mailto:nhibernate-development+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=96ObbM4BCrWNzRpAvvjglLQpTZljuDaaPYYQgNzS618%3D&reserved=0>. -- --- 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 nhibernate-development+unsubscr...@googlegroups.com<mailto:nhibernate-development+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=96ObbM4BCrWNzRpAvvjglLQpTZljuDaaPYYQgNzS618%3D&reserved=0>. -- --- 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 nhibernate-development+unsubscr...@googlegroups.com<mailto:nhibernate-development+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7Croger.kratz%40teleopti.com%7C0937f0c3e21f401e772f08d65976f722%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794764829160099&sdata=96ObbM4BCrWNzRpAvvjglLQpTZljuDaaPYYQgNzS618%3D&reserved=0>. -- --- 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 nhibernate-development+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.