public MemberAttributeGenerator(MemberGeneratorInfo memberGeneratorInfo, ClassGeneratorInfo classGeneratorInfo) {
     _objectSpace = XPObjectSpace.FindObjectSpaceByObject(memberGeneratorInfo.PersistentMemberInfo);
     _persistentMemberInfo = memberGeneratorInfo.PersistentMemberInfo;
     _column = memberGeneratorInfo.DbColumn;
     _isPrimaryKey = CalculatePrimaryKey(memberGeneratorInfo, classGeneratorInfo);
     _dbTable = classGeneratorInfo.DbTable;
 }
 bool CalculatePrimaryKey(MemberGeneratorInfo memberGeneratorInfo, ClassGeneratorInfo classGeneratorInfo)
 {
     if (classGeneratorInfo.DbTable.PrimaryKey != null && memberGeneratorInfo.DbColumn != null)
     {
         return(classGeneratorInfo.DbTable.PrimaryKey.Columns.Contains(memberGeneratorInfo.DbColumn.Name));
     }
     return(false);
 }
 public MemberAttributeGenerator(MemberGeneratorInfo memberGeneratorInfo, ClassGeneratorInfo classGeneratorInfo)
 {
     _objectSpace          = XPObjectSpace.FindObjectSpaceByObject(memberGeneratorInfo.PersistentMemberInfo);
     _persistentMemberInfo = memberGeneratorInfo.PersistentMemberInfo;
     _column       = memberGeneratorInfo.DbColumn;
     _isPrimaryKey = CalculatePrimaryKey(memberGeneratorInfo, classGeneratorInfo);
     _dbTable      = classGeneratorInfo.DbTable;
 }
 bool CalculatePrimaryKey(MemberGeneratorInfo memberGeneratorInfo, ClassGeneratorInfo classGeneratorInfo) {
     if (classGeneratorInfo.DbTable.PrimaryKey != null && memberGeneratorInfo.DbColumn != null)
         return classGeneratorInfo.DbTable.PrimaryKey.Columns.Contains(memberGeneratorInfo.DbColumn.Name);
     return false;
 }