Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate models + Order scope bug #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sohaibbhatti
Copy link

This Pull Request serves two purposes

Adding Annotate Models

In the code base, all models and specs have their attributes and corresponding datatypes in the form of comments. This makes development for developers easier by serving as a visual cue.

Fixed a Bug in the order completed scope

Prior to this, the Order.completed scope was returning the following SQL.

   SELECT "orders".* FROM "orders" WHERE (token != '' OR token != NULL)

The SQL is incorrect because logical operations on NULL will always result in a NULL. i.e. (NULL = NULL would yield a NULL). It has now been fixed to

   SELECT "orders".* FROM "orders" WHERE (token != '' OR token IS NOT NULL)

Sohaib Bhatti added 2 commits February 9, 2013 22:25
DavidMMelin referenced this pull request in DavidMMelin/craftcrate Jul 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant