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

get model id simply, and type check #42

Merged
merged 3 commits into from
May 7, 2018
Merged

Conversation

devvit
Copy link

@devvit devvit commented Mar 1, 2018

Two changes:

  • Better way to get model id.
  • Ecto cannot cast integer to string automatically, throw exception while item_id
    type is :string, Ecto.UUID <=> :string is well done.

@izelnakri
Copy link
Owner

Interesting, can we also write a simple test case for this?

@devvit
Copy link
Author

devvit commented Mar 14, 2018

@izelnakri, I reviewed current test codes, there are many hardcodes, it's difficult to create another string_repo for me, :(

But I can use an environment var STRING_TEST to complete test with uuid_repo, while STRING_TEST is unset, run uuid suite(and skip two tests), otherwise string.

The PR is imperfect, but simple

@izelnakri izelnakri merged commit 1cec571 into izelnakri:master May 7, 2018
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