Closed hasezoey closed 1 month ago
@longsleep does this properly fix you case? also could you explain why it would be necessary aside from
Associations
or is the second "helper"(theupdate(&struct)
) the reason?
Users of the generated structs might need the Identifiable trait in their own code (like to get access to the id
function or for other purposes).
This PR adds derive
diesel::Identifiable
to all Read-structs which have a primary key.fixes #133
Note: personally i thought the
Identifiable
is only necessary forAssociations
or if you want to use the struct directly in aupdate
(see doc quote)source
@longsleep does this properly fix you case? also could you explain why it would be necessary aside from
Associations
or is the second "helper"(theupdate(&struct)
) the reason?