A bug was discovered by one of the OlyMars users (thanks to Benoit Fouletier). This bug is related to the "Business Component Layer" AddOn.

Let's say that we have a Product table related to a Category table; let's say the foreign key CategoryID in the Product table is NOT mandatory. If, for a given record, CategoryID is Null, incorrect behavior occurs in the Product class:

Product myProduct = new Product("...", myProductID)

if (myProduct.CategoryID.IsNull) {

    string categoryName = myProduct.Category.Name; // returns something (the first record of the table) instead of returning a Null reference

}

This bug was corrected in the latest build (1.0.1638.23471 or later). A NullReferenceException exception is now thrown if you try to access the myProduct.Category object whereas myProduct.CategoryID is System.Data.SqlTypes.SqlInt32.Null

You need to re import back the "Business Component Layer" AddOn and rebuild the corresponding AddIn (see <OlyMars Directory>\AddOns\Business Components Layer\Documentation.mht).