本文整理汇总了C#中IOuterJoinLoadable.GetPropertyTableName方法的典型用法代码示例。如果您正苦于以下问题:C# IOuterJoinLoadable.GetPropertyTableName方法的具体用法?C# IOuterJoinLoadable.GetPropertyTableName怎么用?C# IOuterJoinLoadable.GetPropertyTableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOuterJoinLoadable
的用法示例。
在下文中一共展示了IOuterJoinLoadable.GetPropertyTableName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLHSTableName
public static string GetLHSTableName(
IAssociationType type,
int property,
IOuterJoinLoadable lhsPersister
)
{
if (type.UseLHSPrimaryKey)
{
return lhsPersister.TableName;
}
else
{
string propertyName = type.LHSPropertyName;
if (propertyName == null)
{
//if there is no property-ref, assume the join
//is to the subclass table (ie. the table of the
//subclass that the association belongs to)
return lhsPersister.GetSubclassPropertyTableName(property);
}
else
{
//handle a property-ref
string propertyRefTable = lhsPersister.GetPropertyTableName(propertyName);
if (propertyRefTable == null)
{
//it is possible that the tree-walking in OuterJoinLoader can get to
//an association defined by a subclass, in which case the property-ref
//might refer to a property defined on a subclass of the current class
//in this case, the table name is not known - this temporary solution
//assumes that the property-ref refers to a property of the subclass
//table that the association belongs to (a reasonable guess)
//TODO: fix this, add: IOuterJoinLoadable.getSubclassPropertyTableName(string propertyName)
propertyRefTable = lhsPersister.GetSubclassPropertyTableName(property);
}
return propertyRefTable;
}
}
}