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

Improvement - NHibernate configuration - Add attributes to mark classes for NHibernate mapping #6

Open
xhafan opened this issue Mar 20, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@xhafan
Copy link
Owner

xhafan commented Mar 20, 2019

Currently one needs to override methods in NhibernateConfigurator to customize NHibernate mapping.

Examples:

  • to map a class as NHibernate component, one needs to override BaseNhibernateConfigurator.GetComponentTypes() (code sample here)
  • to map a class hierarchy as a discriminated type saving the whole class hierarchy into one table, one needs to override BaseNhibernateConfigurator.GetDiscriminatedTypes() (code sample here)

The same goes for other methods in BaseNhibernateConfigurator (GetIncludeBaseTypes, GetIgnoreBaseTypes).

It would be handy to have a set of attributes to mark a class as NHibernate component, or mark it as a discriminated type, or mark a base class as "included" in mapping or "ignored" from mapping.

@xhafan xhafan self-assigned this Mar 20, 2019
@xhafan xhafan added the enhancement New feature or request label Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant