-
Notifications
You must be signed in to change notification settings - Fork 19
Separate naming in web crate from db crate #187
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We currently do the same thing that's bad about Rails which is pushing people towards having a single concept of entity from the JSON API to the database table. E.g. for CRUD controllers, we use one name, e.g. notes that we then use for the controller's module name as well as to guess the name of the entity and the names of the functions to create, load, etc. entities.
We should have better separation here and use separate arguments for the controller name and for the entity name. In many cases both would be the same which would still not mean lots of additional effort for the developer (really just a few extra characters need to be typed) e.g.
cargo generate crud-controller notes Note
In some cases, the controller and entity names could also be different though, e.g.:
cargo generate crud-controller tasks Todo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request