Backwards References

Sometimes the MineMarket object model contains what is called a ‘backwards reference’, where a child object that is part of a collection contains a reference directly to its parent. There is no need to write a CDAL query on the child object to find its parent.

For example, an AnalyteDef object contains a collection of sub-analytes and has the following property defined:

Copy
[DataFieldAttribute("ParentAnalyteDefID", true, typeof(BTKey))]
[Mincom.MineMarket.DAL.Category("Quality"),
public AnalyteDef Parent
{
    get {return mParent;}
    set
    {
        mOldValue = mParent;
        mParent = value;
        base.PropertyChanged("Parent", value);
    }
}

If the analyte is a part of the sub-analyte collection, the Parent property contains the AnalyteDefID of the parent analyte.

Screenshot of a CDAL entity relationship diagram for parent analytes