-
-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Description
The documentation, for the EntityFirst approach, states that the schema_registry should be done with a ::* at the end, but this breaks registration:
// synchronizes database schema with entity definitions
db.get_schema_registry("my_crate::entity::*").sync(db).await?;
But the code that does the registration uses .starts_with:
for entity in inventory::iter::<EntityRegistry>() {
if entity.module_path.starts_with(module_path) {
it took me a while to figure out why nothing was working and I had to dig deep in code.
There are two fixes that might be worh.:
1 - fix the documentation (and blogposts) to remote the ::*
2 - add a print to stderr saying that the module path is unexpected, to help the development process.
Metadata
Metadata
Assignees
Labels
No labels