Difference between revisions of "Nullable Dates"

From AbleCommerce Wiki
Jump to: navigation, search
(New page: In AbleCommerce 7.0.0 through AbleCommerce 7.0.7, many of our objects had DateTime properties that were nullable in the database. In these versions we would translate null into the value ...)
(No difference)

Revision as of 15:41, 17 October 2012

In AbleCommerce 7.0.0 through AbleCommerce 7.0.7, many of our objects had DateTime properties that were nullable in the database. In these versions we would translate null into the value System.DateTime.MinValue when reading the records. When making business logic decisions the DateTime property would need to have the value checked to see if a value was present.

In AbleCommerce Gold the behavior changes slightly. Instead of translating null dates, our DateTime properties are nullable. This means the property can either be null or it can have a value. In order to use these DateTime properties you must be sure to factor in the possibility that the value does not exist in the database. In these cases you must decide how to handle that condition.

A list of the properties that are nullable are below:

CLASS PROPERTY SIGNIFICANCE OF NULL
Coupon StartDate The coupon has no restriction on when it starts to be valid.
Coupon EndDate The coupon has no restriction on when it ceases to be valid.
EmailList LastSendDate The email list has never been sent.
EmailListUser LastSendDate The email list has never been sent to this list member.
OrderItemDigitalGood ActivationDate The digital good has not been activated.
OrderItemDigitalGood DownloadDate The digital good has not been downloaded.
OrderShipment ShipDate The order shipment has not been shipped.
Subscription ExpirationDate The subscription has no expiration.
Payment CompletedDate The payment has not yet been completed.
Special StartDate The special has no restriction on when it starts to be active.
Special EndDate The special has no restriction on when it ceases to be active.
Redirect LastVisitedDate The redirect has never been visited.
Currency LastUpdate The exchange rate for the currency has never been updated.
User AffiliateReferralDate The user has not been referred by an affiliate.
User LastActivityDate The user has never browsed the site.
User LastLoginDate The user has never logged in.
User LastPasswordChangedDate The user has never changed the password.
User LastLockoutDate The user has never been locked out.