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

Allow to set fields to Default when constructing struct from query #1582

Closed

Commits on Mar 2, 2018

  1. Allow to set fields to Default when constructing struct from query

    This commit adds a `#[diesel(default)]` field attribute to
    `#[derive(Queryable)]`, that allows a user to set a field to a default
    value instead of loading it from the database. This is usefull if the
    same struct is used to serve some API that requires additional
    information to be added.
    weiznich committed Mar 2, 2018
    Configuration menu
    Copy the full SHA
    fe757f8 View commit details
    Browse the repository at this point in the history