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

Database property to check if mapping has been generated #716

Open
ssimo3lsuhsc opened this issue Jun 13, 2024 · 0 comments
Open

Database property to check if mapping has been generated #716

ssimo3lsuhsc opened this issue Jun 13, 2024 · 0 comments

Comments

@ssimo3lsuhsc
Copy link

Could I request that the Database class expose a property Mapped: bool that holds the property that the database has been mapped? One exception is generated if the user tries to construct a db_session without generating a mapping; however, another exception is thrown if the method Database.generate_mapping() is called more than once on a single Database instance. I constantly have to remember in which file I generated the mapping, and so I believe that it is better to always in principle check if a mapping has been generated in the header of any file in which I use Pony entities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant