Hibernate version:
2.1.0 alpha1
I need some help figuring out some changes between 1.2.1 and 2.1.0
Question 1:
I used to do this:
Code:
LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer((INHibernateProxy)item);
The GetLazyInitializer method is now gone, how do I initialize a proxy now?
Question 2:To handle partial collections and unitialized collections I used to do this:
Code:
/// <summary>
/// Explicitly sets the collection to initialized without going to the
/// database, this can be hazerdous because it tells nHibernate that
/// the collection as it sits is fully loaded.
/// </summary>
public virtual void ManualInitialize()
{
try
{
if (!(this.WasInitialized))
{
this.SetInitialized();
bag = new K();
this.Session.GetSessionImplementation()
.GetCollectionEntry(this)
.InitSnapshot(this, Session.GetSessionImplementation().GetCollectionEntry(this).LoadedPersister);
this._WasManuallyInitialized = true;
}
}
catch (Exception)
{
throw;
}
this whole process seems to have changed, how can I fool the framework into thinking the collection is valid?
I go this far:
this.Session.PersistenceContext.GetCollectionEntry(this)
however, the InitSnapshot is gone along with the AddCollection methods from sessionimpl where or how is this done?
Question 3:What happened to the ISessionFactory.ConnectionProvider? I used to reflect into it to get the connection string is there a different/better way to accomplish this now?
I realize that 2.1.0 is a bleeding edge build but I need some functionality that is in there so hopefully all these things can accomplished.
Question 4:I noticed this:
Code:
public class SchemaUpdate
Does this do what it implies and does it actually function??? That would be like Christmas :)