New issue
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
Feature request: allow for run-time table name change. #173
Comments
|
BTW, it turns out there is no good way to get model's table name in the user land. Attribute I think the solution is in making |
|
@vrurg What do you think of this solution? |
|
Looks absolutely reasonable. Thanks! |
|
Thanks! |
Make it possible for a model to change its table name by a user at run-time. Proposed syntax would be:
Considering that this approach would change the table name globally conflicts are possible if third-party modules are would be willing to use own tables for the same published model. I.e. lets assume there is a module
Red::DBHashproviding a hash mapped onto a table. There're modulesFooandBarpublished on CPAN too. Both are usingRed::DBHashbut for different purposes. Both would need their own tables.To resolve this situation a method
new_modelcould be provided which would return a run-time created model type:Unless undocumented method
.^aliasdoes the same.The text was updated successfully, but these errors were encountered: