本文整理匯總了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