Replies: 1 comment 1 reply
-
|
Hey @arucil, interesting use case! I guess you're working with a legacy DB? Can you share your code by filing a PR? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I chose SeaORM when rewriting some modules of a Node.js server in Rust, and I found one important feature that is missing in SeaORM is custom table name prefix. Implementing
EntityNamemanually solves the problem, but it also requires implementing many other structs and traits that could have been generated byDeriveEntityModel, which is a PITA.Neither
EntityandDatabaseConnectionis suitable for storing a global table name prefix, so IMO a new ORM manager struct is needed, for example, the initialization becomesCurrently I've added a
table_name_exprattr to theDeriveEntityModelmacro in mysea-ormfork, and changed the return type ofEntityName::table_name()and related types from&strtoCow<str>, so I can writeIt's a bit tedious, but it solves my problem for now.
Beta Was this translation helpful? Give feedback.
All reactions