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> 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
>
>
>
> 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 <
> 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>
> *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%7C12d8001627914305116508d6591266b9%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794332919862702&sdata=N%2B5eP%2FAn4Q6lhY5MCdKjHeGISRNwMsS%2FF2eMNdwq52c%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%7C12d8001627914305116508d6591266b9%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794332919872719&sdata=6oRQ2ihPvHRbnAQ%2FZvDhKgGXzkzSOSSztF9uTI8dghs%3D&reserved=0>
> .
>
> Binaries are available on NuGet and SourceForge:
> https://sourceforge.net/projects/nhibernate/files/NHibernate/5.2.0/
> https://www.nuget.org/packages/NHibernate/5.2.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.
> 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%7C12d8001627914305116508d6591266b9%7C449a67e94f234e758bccf32dd77cefe0%7C0%7C0%7C636794332919872719&sdata=8Ki1etXc4nSjG5xnU3iV3mK89Msjn7tNVDootyUnmNU%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.
>

-- 

--- 
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.

Reply via email to