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

Double alias no longer works #636

Closed
matthewmcgarvey opened this issue Feb 12, 2021 · 2 comments
Closed

Double alias no longer works #636

matthewmcgarvey opened this issue Feb 12, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@matthewmcgarvey
Copy link
Member

This seems to not working anymore with lucky 0.26

alias Double = Float64
class Agency < BaseModel
    column latitude : Double?
    column longitude : Double?
end

The error:

PG::ResultSet#read returned a Float64. A (PG::Numeric | Nil) was expected.

I see here 8bf9a1f#diff-7388ecacebfb91d79a5f8b87e42556bdbc805add6ebe0c5005ad7b180ba8efddR7 an update of the ColumnType

Originally posted by @brunto in #200 (comment)

@matthewmcgarvey matthewmcgarvey added the bug Something isn't working label Feb 12, 2021
@brunto
Copy link
Contributor

brunto commented Feb 17, 2021

I think simply update the ColumnType should work: alias ColumnType = Float64 | ::PG::Numeric

@matthewmcgarvey
Copy link
Member Author

Completed by #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants