Where can I getNHibernate.ByteCode.Castle.ProxyFactoryFactory source ? It was in NHibernate repository, but was removed about month ago. Where is it now ?
Thanks!
NHibernate are no longer maintaining ByteCode providers as of the 3.2 release, as NHibernate will now come with a built-in proxy factory based on LinFu.
You can get the source if you check out or browse a previous version of the NH repository (3.1 or earlier).
I have started maintaining a copy of the ByteCode providers for new versions of NHibernate here: https://github.com/SimonBartlett/NHibernate.ByteCode
Related
We are using this specific version of Nhibernate in our application. And now we come across a situation where we want to debug an issue through Nhibernate, But I am unable to find source code for this specific version in Nhibernate git.
Source package can be downloaded here
https://sourceforge.net/projects/nhibernate/files/NHibernate/3.1.0.GA/
Other versions (latest at the moment is 5):
https://sourceforge.net/projects/nhibernate/files/NHibernate/
I am using NHibernate in a project, and I am trying to add it to my solution using NuGet. When I search for NHibernate in the package manager I see three different results:
NHibernate, version 3.2.0.4000, "NHibernate is a mature, open source object-relational mapper for the .NET framework. "
NHibernate.Castle, version 3.1.0.4000, "This package enables the ability to use lazy-loading with Castle dynamic-proxy."
NHibernate.LinFu, version 3.1.0.4000, "This package enables the ability to use lazy-loading with LinFu dynamic-proxy."
I would like to use lazy loading in this application, but the most recent package with a version of 3.2 makes no mention of it. Do I need to download either the .Castle or .LinFu versions to get lazy loading support, even though they appear to be older versions of NHibernate? Does NHibernate 3.2 incorporate lazy loading without requiring the need for the external Castle or LinFu proxy implementations?
Thanks for any advice.
No, you don't need to download anything besides NH 3.2.
NHibernate 3.2 removes almost all dependencies, including the ones for lazy load, now it comes with a built-in bytecode provider.
As you know NHibernate 3.2 has native bytecode provider, which has some breaking changes with castle bytecode provider.
For example:
public class SomeEntity
{
public virtual string SomeProperty { get; **private set;**}
}
Is working fine with NHibernate 3.1 and Castle Bytecode provider. And not in NH 3.2.
I'm using nuget for managing my dependencies and do not want to manage them by hands. So my question is: would bytecode providers for castle, linfu and spring be available in nuget?
The NHibernate team won't support those bytecode providers any more.
It hasn't been officially voted, but I don't think the Castle team will support it either.
Fortunately, this is all open source, so you can just go ahead and grab the code and maintain it and put it on NuGet. It could be either a NHibernate contrib or a Castle contrib project.
Still, if this used to work and doesn't anymore (and the change isn't documented, make sure it isn't), it could be a regression bug, and so it should be reported (make sure it hasn't been reported already) and fixed.
NHibernate 3.2 has introduced quite a number of undocumented breaking changes, particularly for those folks previously using the Castle bytecode provider.
The Castle bytecode provider is being maintained on GitHub, in this repository: https://github.com/sibartlett/NHibernate.ByteCode
I'm working on a personal learning project to help me understand how to use Castle Windsor and Fluent NHibernate. So far written an ASP.NET MVC project which does some basic dependency injection of services into controllers.
My project contains the following references:
Castle.Core 1.2.0.0
Castle.DynamicProxy 2.2.0.0
Castle Windsor 2.1.0.0
NHibernate.Core 2.1.2.4000
FluentNHibernate 1.1.0.694
I managed to get these playing nicely together by taking the NHibernate.ByteCode.Castle.dll from the Active Record project as I found suggested elsewhere on StackOverflow.
Id like to use the NHibernate Integration Facility but I'm having a bit of a dependency nightmare trying to find a compatible version. All of this is still very new to me and I think Ive done well to get as far as I have!
What am I going to have to do in order to add the NHibernate Integration Facility to my project? Does a compatible version exist and if so where can I find it? Alternatively is it possible to compile a version that works with the dependencies Im using?
There is a compatible version, but you must build it yourself as there have been no releases of the library.
Open a command prompt, and given you have installed git:
git clone https://github.com/castleproject/Castle.Facilities.NHibernateIntegration.git
cd Castle.Facilities.NHibernateIntegration
git reset --hard aef2d2ef324071d961474b41fcb312dd48d0e946.
(Resetting to commit aef2d2e gives you the version of the libs you use.)
Now run ClickToBuild.cmd and you'll find the facility assembly in the build folder.
If you don't want to install git you can also download the source from Github for this commit by clicking on the download button at this link:
https://github.com/castleproject/Castle.Facilities.NHibernateIntegration/commit/aef2d2ef324071d961474b41fcb312dd48d0e946
Trying out nHibernate, it says it can't find Iesi.Collections.
Where can I get this from? Shouldn't it ship with the nHibernate download if it is so vital?
The source for Iesi.Collections delivered with NHibernate is here:
https://github.com/nhibernate/nhibernate-core/tree/3.3.x/src
During 2012 it was moved to separate repository:
https://github.com/nhibernate/iesi.collections
Recently master in that repo was changed heavily to adjust to .Net 4, but before that the API had been essentially unchanged for many years.
Binaries of new and old versions are available on NuGet.
This might be an old question, but it's available via NuGet.