Example #1
0
 /// <summary>
 /// Get the columns of the owning entity which are to 
 /// be used in the join
 /// </summary>
 public static string[] GetLHSColumnNames(
     IAssociationType type,
     int property,
     int begin,
     IOuterJoinLoadable lhsPersister,
     IMapping mapping
     )
 {
     if (type.UseLHSPrimaryKey)
     {
         //return lhsPersister.getSubclassPropertyColumnNames(property);
         return lhsPersister.IdentifierColumnNames;
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             //slice, to get the columns for this component
             //property
             return ArrayHelper.Slice(
                 lhsPersister.GetSubclassPropertyColumnNames(property),
                 begin,
                 type.GetColumnSpan(mapping)
                 );
         }
         else
         {
             //property-refs for associations defined on a
             //component are not supported, so no need to slice
             return lhsPersister.GetPropertyColumnNames(propertyName);
         }
     }
 }