1
1
using System ;
2
2
using System . Collections ;
3
3
using System . Collections . Generic ;
4
- using System . Data ;
4
+ using System . Data ;
5
+ using NHibernate . Collection . Generic ;
5
6
using NHibernate . Engine ;
6
7
using NHibernate . Impl ;
7
8
using NHibernate . Loader ;
@@ -482,7 +483,7 @@ protected void ThrowLazyInitializationException(string message)
482
483
{
483
484
var ownerEntityName = role == null ? "Unavailable" : StringHelper . Qualifier ( role ) ;
484
485
throw new LazyInitializationException ( ownerEntityName , key , "failed to lazily initialize a collection"
485
- + ( role == null ? "" : " of role: " + role ) + ", " + message ) ;
486
+ + ( role == null ? "" : " of role: " + role ) + ", " + message ) ;
486
487
}
487
488
488
489
/// <summary>
@@ -540,7 +541,7 @@ public bool UnsetSession(ISessionImplementor currentSession)
540
541
public virtual bool SetCurrentSession ( ISessionImplementor session )
541
542
{
542
543
if ( session == this . session // NH: added to fix NH-704
543
- && session . PersistenceContext . ContainsCollection ( this ) )
544
+ && session . PersistenceContext . ContainsCollection ( this ) )
544
545
{
545
546
return false ;
546
547
}
@@ -556,7 +557,7 @@ public virtual bool SetCurrentSession(ISessionImplementor session)
556
557
else
557
558
{
558
559
throw new HibernateException ( "Illegal attempt to associate a collection with two open sessions: "
559
- + MessageHelper . InfoString ( ce . LoadedPersister , ce . LoadedKey , session . Factory ) ) ;
560
+ + MessageHelper . InfoString ( ce . LoadedPersister , ce . LoadedKey , session . Factory ) ) ;
560
561
}
561
562
}
562
563
else
@@ -574,7 +575,7 @@ public virtual bool SetCurrentSession(ISessionImplementor session)
574
575
/// <param name="persister">The <see cref="ICollectionPersister"/> for this Collection.</param>
575
576
/// <returns>
576
577
/// <see langword="false" /> by default since most collections can determine which rows need to be
577
- /// individually updated/inserted/deleted. Currently only <see cref="PersistentBag "/>'s for <c>many-to-many</c>
578
+ /// individually updated/inserted/deleted. Currently only <see cref="PersistentGenericBag{T} "/>'s for <c>many-to-many</c>
578
579
/// need to be recreated.
579
580
/// </returns>
580
581
public virtual bool NeedsRecreate ( ICollectionPersister persister )
@@ -690,8 +691,7 @@ public virtual void AfterRowInsert(ICollectionPersister persister, object entry,
690
691
/// belong to the collection, and a collection of instances
691
692
/// that currently belong, return a collection of orphans
692
693
/// </summary>
693
- protected virtual ICollection GetOrphans ( ICollection oldElements , ICollection currentElements , string entityName ,
694
- ISessionImplementor session )
694
+ protected virtual ICollection GetOrphans ( ICollection oldElements , ICollection currentElements , string entityName , ISessionImplementor session )
695
695
{
696
696
// short-circuit(s)
697
697
if ( currentElements . Count == 0 )
@@ -829,7 +829,7 @@ public virtual object GetIdentifier(object entry, int i)
829
829
/// <param name="owner">The owner of this Collection.</param>
830
830
/// <returns>The object that was contained in the row.</returns>
831
831
public abstract object ReadFrom ( IDataReader reader , ICollectionPersister role , ICollectionAliases descriptor ,
832
- object owner ) ;
832
+ object owner ) ;
833
833
834
834
public abstract object GetSnapshotElement ( object entry , int i ) ;
835
835
0 commit comments