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

Potential breaking changes from 0.23.0 to 0.24.0 #303

Closed
phungleson opened this issue Apr 16, 2022 · 7 comments · Fixed by #305
Closed

Potential breaking changes from 0.23.0 to 0.24.0 #303

phungleson opened this issue Apr 16, 2022 · 7 comments · Fixed by #305
Assignees

Comments

@phungleson
Copy link

Description

Hey peeps, I encounter 2 errors when trying to upgrade from 0.23.0 to 0.24.0.

Steps to Reproduce

First one, this used to work in 0.23.0

Query::insert()
        .into_table(Shops::Table)
        .columns(vec![
            ...
            Shops::GroupId,
            ...
        ])
        .exprs(vec![
            ...
            Expr::value(group_id.clone()),

With group_id is &Option<Uuid>

and

group_id UUID REFERENCES groups (id) ON DELETE CASCADE,

But it throws an error in 0.24.0

column \"group_id\" is of type uuid but expression is of type boolean

Second one, this used to work in 0.23.0

Query::insert()
        .into_table(Shops::Table)
        .columns(vec![
            ...
            Shops::Description,
            ...
        ])
        .exprs(vec![
            ...
            Expr::value(description.clone()),

With description is &Option<String>

and

description VARCHAR,

But it throws an error in 0.24.0

incorrect binary data format in bind parameter 4

Expected Behavior

I downgraded back to 0.23.0 and they all working again.

Actual Behavior

Provided.

Reproduces How Often

Provided.

Versions

Provided.

Additional Information

I am testing with postgres, let me know if you need me to debug further.

Thanks!

@ikrivosheev
Copy link
Member

@phungleson hello, thank you for the report, I will look this bug tomorrow...

@tyt2y3
Copy link
Member

tyt2y3 commented Apr 17, 2022

Yeah it seems to have caught by our CI now, it's only a Postgres issue apparently

@billy1624
Copy link
Member

I guess the bug originate from the fact that we bind Option<T> as Option::<bool>::None if it's a None

@ikrivosheev
Copy link
Member

@phungleson @tyt2y3 @billy1624 I apologize for the mistake. I did PR)

@Sytten
Copy link
Contributor

Sytten commented Apr 17, 2022

My CI tests broke for 0.24 but I didnt have time to investigate, I will report back

@phungleson
Copy link
Author

Thanks for quick turn around @ikrivosheev 👍

@tyt2y3
Copy link
Member

tyt2y3 commented Apr 18, 2022

Thank you @ikrivosheev
A new release has been made 0.24.2

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 a pull request may close this issue.

5 participants