本文整理汇总了C#中NHibernate.Mapping.PersistentClass.GetJoinNumber方法的典型用法代码示例。如果您正苦于以下问题:C# PersistentClass.GetJoinNumber方法的具体用法?C# PersistentClass.GetJoinNumber怎么用?C# PersistentClass.GetJoinNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NHibernate.Mapping.PersistentClass
的用法示例。
在下文中一共展示了PersistentClass.GetJoinNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SingleTableEntityPersister
//.........这里部分代码省略.........
}
catch (InvalidCastException cce)
{
throw new MappingException(
string.Format("Illegal discriminator type: {0} of entity {1}", discriminatorType.Name, persistentClass.EntityName), cce);
}
catch (Exception e)
{
throw new MappingException("Could not format discriminator value to SQL string of entity " + persistentClass.EntityName, e);
}
}
}
else
{
forceDiscriminator = false;
discriminatorInsertable = false;
discriminatorColumnName = null;
discriminatorAlias = null;
discriminatorType = null;
discriminatorValue = null;
discriminatorSQLValue = null;
discriminatorFormula = null;
discriminatorFormulaTemplate = null;
}
#endregion
#region PROPERTIES
propertyTableNumbers = new int[PropertySpan];
int i2 = 0;
foreach (Property prop in persistentClass.PropertyClosureIterator)
{
propertyTableNumbers[i2++] = persistentClass.GetJoinNumber(prop);
}
List<int> columnJoinNumbers = new List<int>();
List<int> formulaJoinedNumbers = new List<int>();
List<int> propertyJoinNumbers = new List<int>();
foreach (Property prop in persistentClass.SubclassPropertyClosureIterator)
{
int join = persistentClass.GetJoinNumber(prop);
propertyJoinNumbers.Add(join);
//propertyTableNumbersByName.put( prop.getName(), join );
propertyTableNumbersByNameAndSubclass[prop.PersistentClass.EntityName + '.' + prop.Name] = join;
foreach (ISelectable thing in prop.ColumnIterator)
{
if (thing.IsFormula)
formulaJoinedNumbers.Add(join);
else
columnJoinNumbers.Add(join);
}
}
subclassColumnTableNumberClosure = columnJoinNumbers.ToArray();
subclassFormulaTableNumberClosure = formulaJoinedNumbers.ToArray();
subclassPropertyTableNumberClosure = propertyJoinNumbers.ToArray();
int subclassSpan = persistentClass.SubclassSpan + 1;
subclassClosure = new string[subclassSpan];
subclassClosure[0] = EntityName;
if (persistentClass.IsPolymorphic)
subclassesByDiscriminatorValue[discriminatorValue] = EntityName;
#endregion