Comments (6)
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)
from diesel.
(I might eventually be able to support reading a non-nullable field into an option, but at the moment coherence prevents it)
from diesel.
I'm totally fine to (and prefer to) use separate structs for changesets and queriable, but the first error comes from just using #[changeset_for(users)]
on the UserChanges struct
from diesel.
Oh, whoops!
from diesel.
^----- That commit probably also makes save_changes
way more useful for your use case as well
from diesel.
Definitely, that's awesome!
from diesel.
Related Issues (20)
- Segmentation Fault in R2D2 postgres (interrupted by signal 11: SIGSEGV) HOT 10
- `joinable!` is not generated for two foreign keys referencing the same table HOT 1
- Diesel-cli Can't connect to local MySQL server through socket '/tmp/mysql.sock' HOT 1
- Deserialization layer seems too permissive with regards to checking the actual types received HOT 1
- Can't use `into_boxed` after union HOT 1
- table have more than one primary_key can not use on_conflict(diesel::dsl::DuplicatedKeys) HOT 7
- No intellisense when using query dsl HOT 6
- `overflow evaluating the requirement` when writing generic diesel code HOT 1
- Pagination guide doesn't work on entity represented by joined tables HOT 2
- losing type information when adding WHERE (filter) clause to query HOT 2
- Diesel not generate joinable when there are 2 foreign keys reference same field HOT 1
- `#[derive(AsExpression, FromSqlRow)]` won't compile when generic bounds have a default implementation. HOT 2
- Serials keep incrementing despite begin_test_transaction HOT 3
- Source code for diesel_derives 2.1.2 not available on GitHub HOT 1
- Cannot use multiple table_name for Insertable when also deriving Queryable HOT 1
- SSL_MODE option not behaving correctly with Mysql 5.7 HOT 3
- Derive Queryable deserialize_as attribute doesn't support tuples HOT 4
- msvc+rust1.75 compile error HOT 4
- `Using unsupported buffer type: 253 (parameter: 1)` when trying to use the CLI HOT 14
- double free or corruption issue when establishing connection HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diesel.