Skip to content

Commit

Permalink
Correctly onforwards ItemInstance calls up the object hierarchy. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
hisystems committed Jun 25, 2013
1 parent 6bab5b2 commit ba612ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Generic/DatabaseObjects.cs
Expand Up @@ -505,6 +505,15 @@ protected virtual T ItemInstance_()
{
return (T)base.ItemInstance();
}

/// <summary>
/// On forward the call from the ItemInstance onto the generic ItemInstance_
/// so that if ItemInstance_ is overridden the correct item instance will be loaded.
/// </summary>
protected override IDatabaseObject ItemInstance()
{
return this.ItemInstance_();
}
}
}

9 changes: 9 additions & 0 deletions Generic/DatabaseObjectsVolatile.cs
Expand Up @@ -231,6 +231,15 @@ protected virtual T ItemInstance_()
{
return (T)base.ItemInstance();
}

/// <summary>
/// On forward the call from the ItemInstance onto the generic ItemInstance_
/// so that if ItemInstance_ is overridden the correct item instance will be loaded.
/// </summary>
protected override IDatabaseObject ItemInstance()
{
return this.ItemInstance_();
}

/// --------------------------------------------------------------------------------
/// <summary>
Expand Down

0 comments on commit ba612ce

Please sign in to comment.