Skip to content

Make obsolete abstract virtual #1770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1649,15 +1649,24 @@ public object NotFoundObject
// 6.0 TODO: Remove (Replace with ISupportSelectModeJoinable.SelectFragment)
// Since v5.2
[Obsolete("Use overload taking includeLazyProperties parameter")]
public abstract string SelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias, string currentEntitySuffix,
string currentCollectionSuffix, bool includeCollectionColumns);

public virtual string SelectFragment(
IJoinable rhs,
string rhsAlias,
string lhsAlias,
string currentEntitySuffix,
string currentCollectionSuffix,
bool includeCollectionColumns)
{
return SelectFragment(
rhs, rhsAlias, lhsAlias, currentEntitySuffix, currentCollectionSuffix, includeCollectionColumns, false);
}

// 6.0 TODO: Make abstract
public virtual string SelectFragment(
IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix,
bool includeCollectionColumns, bool includeLazyProperties)
{
throw new NotImplementedException("Fetching lazy properties is not implemented by " + GetType().FullName);
throw new NotImplementedException("SelectFragment with fetching lazy properties option is not implemented by " + GetType().FullName);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,6 @@ public override string SelectFragment(IJoinable rhs, string rhsAlias, string lhs
return includeCollectionColumns ? SelectFragment(lhsAlias, collectionSuffix) : string.Empty;
}

// Since v5.2
[Obsolete("Use overload taking includeLazyProperties parameter")]
public override string SelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias,
string entitySuffix, string collectionSuffix, bool includeCollectionColumns)
{
return SelectFragment(rhs, rhsAlias, lhsAlias, entitySuffix, collectionSuffix, includeCollectionColumns, false);
}

private string ManyToManySelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias, string collectionSuffix)
{
SelectFragment frag = GenerateSelectFragment(lhsAlias, collectionSuffix);
Expand Down
7 changes: 0 additions & 7 deletions src/NHibernate/Persister/Collection/OneToManyPersister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,6 @@ protected override int DoUpdateRows(object id, IPersistentCollection collection,
}
}

// Since v5.2
[Obsolete("Use overload taking includeLazyProperties parameter")]
public override string SelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns)
{
return SelectFragment(rhs, rhsAlias, lhsAlias, entitySuffix, collectionSuffix, includeCollectionColumns, false);
}

public override string SelectFragment(IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns, bool fetchLazyProperties)
{
var buf = new StringBuilder();
Expand Down