Skip to content
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

Allow custom string instead of FQCN for object_class discriminator field #2844

Open
stefgodin opened this issue Jul 18, 2024 · 1 comment
Open
Labels

Comments

@stefgodin
Copy link

Feature Request

Currently, in Translatable, the created table contains an object_class column that stores the specific class name.

I propose allowing custom strings (opt-in) instead of specific class names, similar to how Doctrine allows user-defined strings for its inheritance map.

For example, a App\Entity\Skill class is normally mapped to its FQCN, but it could be overridden with a "skill" string.

The reason for this request is that modifying the class FQCN (e.g., moving the namespace or renaming the class) requires running a database migration to remap all translations. Ideally, this change would allow code modification without necessitating a database update.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant