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

editoast: cannot declare Model fields in different order from the table's columns #9468

Closed
leovalais opened this issue Oct 24, 2024 · 0 comments · Fixed by #9689
Closed

editoast: cannot declare Model fields in different order from the table's columns #9468

leovalais opened this issue Oct 24, 2024 · 0 comments · Fixed by #9689
Labels
area:editoast Work on Editoast Service kind:bug Something isn't working

Comments

@leovalais
Copy link
Contributor

What happened?

CREATE TABLE toto(foo, bar, baz);
#[derive(Model)]
#[model(ops = crud)]
struct Toto {
    bar: (),
    baz: (),
    foo: (),
}

doesn't compile and the error is really confusing.

What did you expect to happen?

It should compile and work, or at the very least the compilation error should be informative.

How can we reproduce it (as minimally and precisely as possible)?

Swap two fields of an existing model.

On which environments the bug occurs?

Local

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

dev

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

Successfully merging a pull request may close this issue.

1 participant