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

Cannot access schema when creating custom IJoinedSubclassConvention implementation #319

Closed
stackh34p opened this issue Sep 1, 2015 · 2 comments · Fixed by #464
Closed
Milestone

Comments

@stackh34p
Copy link
Contributor

stackh34p commented Sep 1, 2015

Currently I am in need of implementing the IJoinedSubclassConvention where I need to override the schema, by deriving from the original schema name. The IJoinedSubclassInstance interface exposes a Schema method for that, but it does not allow you to access the current value of the schema.

For reference, it is possible when implementing IClassConvention to access the member Schema by the following line:
var schema = ((IClassInspector) instance).Schema;, where instance is the IClassInstance object.

Doing so with IJoinedSubclassInstance as follows:
var schema = ((IJoinedSubclassInspector) instance).Schema;
does not work, as there is no such property, nor it seems that the IJoinedSubclassInstance exposes that in any other way. Thus, I was forced to use reflection to get my thing done.

I think there should be a Schema property there, for the sake of consistency with the other convention interfaces which are applicable.


I am willing to personally provide a patch if you would agree such functionality is necessary in the future development of the project.

@chester89
Copy link
Collaborator

That would be great. How would you do it - adding a property/method to an interface?

@stackh34p
Copy link
Contributor Author

Yes, I plan to make the same thing that is present in the ClassInspector implementation - expose the mapping.Schema property. Of course, I plan to add it also to the IJoinedSubclassInspector interface.

@stackh34p stackh34p changed the title Cannot access schema when creating custom IJoinedSubclassInstance Cannot access schema when creating custom IJoinedSubclassConvention implementation Sep 2, 2015
hazzik added a commit that referenced this issue Sep 18, 2020
Fixes #319 

Co-authored-by: ivaylo5ev <ivaylo5ev@gmail.com>
@hazzik hazzik added this to the 2.1.3 milestone Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants