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

Ignore struct fields for column #1275

Closed
lephyrius opened this Issue Oct 25, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@lephyrius

lephyrius commented Oct 25, 2017

Is there a way to ignore fields in a model. So let's say I want:

#[derive(Serialize, Deserialize,Debug, Queryable, Insertable, Identifiable, Associations,AsChangeset)]
struct Metric {
  pub id: i32,
  pub metrics: Option<Vec<OtherMetric> >   // <- This doesn't have a table column.
}

So how do I add fields that doesn't have table column?

@Eijebong

This comment has been minimized.

Member

Eijebong commented Oct 25, 2017

Isn't that the same thing as #860 for Queryable ?

@lephyrius

This comment has been minimized.

lephyrius commented Oct 25, 2017

@Eijebong Yes, let's close this.

@lephyrius lephyrius closed this Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment