We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Give the following struct definition:
#[derive(Model)] pub(crate) struct Trainer { #[rorm(id)] pub(crate) id: i64, #[rorm(on_delete = "Cascade")] pub(crate) user: ForeignModel<User>, pub(crate) trainer_name: String, pub(crate) trainer_sprite: i16, #[rorm(default = 0)] pub(crate) money: i32, #[rorm(field = "TrainerFriend::F.origin")] pub(crate) friends: BackRef<TrainerFriend>, }
When exporting the .models.json: The following snippet is produced: {"Name":"trainer_name","Type":"varchar","Annotations":[{"Type":"not_null"}]}
.models.json
{"Name":"trainer_name","Type":"varchar","Annotations":[{"Type":"not_null"}]}
Intended behavior: There should be a compile time error when trying to use a String without a max_length annotation
max_length
The text was updated successfully, but these errors were encountered:
75d2952
gammelalf
No branches or pull requests
Give the following struct definition:
When exporting the
.models.json
: The following snippet is produced:{"Name":"trainer_name","Type":"varchar","Annotations":[{"Type":"not_null"}]}
Intended behavior:
There should be a compile time error when trying to use a String without a
max_length
annotationThe text was updated successfully, but these errors were encountered: