Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up#[changeset_for] codegen issue #50
Comments
This comment has been minimized.
|
You'll need to use two different structs for that use case. (Which makes sense if you think about it, you don't want to have to deal with options for reads, when you know the field is always present) |
sgrif
closed this
Dec 4, 2015
This comment has been minimized.
|
(I might eventually be able to support reading a non-nullable field into an option, but at the moment coherence prevents it) |
This comment has been minimized.
|
I'm totally fine to (and prefer to) use separate structs for changesets and queriable, but the first error comes from just using |
This comment has been minimized.
|
Oh, whoops! |
sgrif
reopened this
Dec 4, 2015
sgrif
closed this
in
fbf12e7
Dec 4, 2015
This comment has been minimized.
|
^----- That commit probably also makes |
This comment has been minimized.
|
Definitely, that's awesome! |
mcasper commentedDec 4, 2015
Trying to use
#[changeset_for]for the struct:Produces the error:
However, adding
#[derive(Queriable)]to the struct annotation raises the error:Halp