Skip to content

Has one with zero#681

Merged
dxg merged 6 commits intodresende:masterfrom
stueynz:hasOne-with-zeroID
Dec 8, 2015
Merged

Has one with zero#681
dxg merged 6 commits intodresende:masterfrom
stueynz:hasOne-with-zeroID

Conversation

@stueynz
Copy link

@stueynz stueynz commented Dec 4, 2015

I've got a pre-existing database that started all its 'serial' IDs at zero...so I need to allow for Zero as a valid value for FK column in hasOne().

hasValues() is only used in hasOne association, so it's probably ok to make this change.

…ng databases may've used zero as a valid entity identifier
…ng databases may've used zero as a valid entity identifier.
@dxg
Copy link
Collaborator

dxg commented Dec 6, 2015

Looks good and makes sense, however the new tests are failing in postgres :(

@stueynz
Copy link
Author

stueynz commented Dec 7, 2015

Fixed for postgres....better check sqllite now.

@stueynz
Copy link
Author

stueynz commented Dec 7, 2015

Fixed it for postgres & sqlite wonder what's wrong for redshift.

@stueynz
Copy link
Author

stueynz commented Dec 8, 2015

Had to do a silly commit to force Travis to re-try the build. Seems ok now.

@dxg
Copy link
Collaborator

dxg commented Dec 8, 2015

👍

dxg added a commit that referenced this pull request Dec 8, 2015
@dxg dxg merged commit b704d31 into dresende:master Dec 8, 2015
@dxg
Copy link
Collaborator

dxg commented Dec 8, 2015

Released in v2.1.29.

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.

2 participants