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

Feature Request for an Updatable SessionFactory #3634

Open
Ganesh13024 opened this issue Dec 13, 2024 · 0 comments
Open

Feature Request for an Updatable SessionFactory #3634

Ganesh13024 opened this issue Dec 13, 2024 · 0 comments

Comments

@Ganesh13024
Copy link

Hello NHiberbate Team,

This request pertains to a feature enhancement related to the current implementation of NHibernate and its SessionFactory. I have already outlined our requirements in the NHUsers thread and would like to extend my gratitude to Mr.Frédéric Delaporte for providing a detailed explanation regarding the immutability of the SessionFactory and its internal components.

Our use case involves a dynamic table schema that is not fixed or standardized. The schema is subject to changes at runtime, and consequently, the mappers are also updated to reflect these changes. While attempting to propagate these mapper updates to the SessionFactory, I encountered a significant limitation: the SessionFactory requires a complete rebuild to accommodate these changes. Unfortunately, this rebuilding process is time-intensive due to the heavy computational cost associated with metadata extraction.

Given the critical role of the SessionFactory in managing database interactions, the inability to update it dynamically poses a challenge in scenarios where frequent schema changes occur. This has led me to consider the feasibility of an updatable SessionFactory that could adapt to runtime changes without necessitating a full rebuild. Such a feature would drastically improve performance and streamline our workflow, particularly in environments where schema evolution is a regular occurrence.

I am aware that ensuring concurrency control in such a system is complex and that threading mechanisms would be essential to achieving this. However, an updatable SessionFactory could mitigate the performance bottlenecks associated with rebuilding and offer a more efficient solution for runtime adaptability.

I hope this provides a clearer understanding of the issue and the motivation behind the feature request. I welcome any further insights or recommendations on how to approach this challenge effectively.

Additionally, I am attaching my SessionFactory build-time changes based on the number of mappers. Could you please consider this scenario as well in the ORM implementation?

image

Best regards,
Ganeshkumar M

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