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

Use the MemberAccessResolver for properties mapped with a CompontentMap #101

Open
cremor opened this issue Oct 3, 2011 · 4 comments
Open

Comments

@cremor
Copy link

cremor commented Oct 3, 2011

Currently the MemberAccessResolver isn't used for component properties mapped with a ComponentMap. Additionally there is no way to use the Access object which is returned from the MemberAccessResolver to specify the access strategy in a convention (the access strategy can only be specified with the fluent methods).

Either one of this two ways should be possible, preferably the first (MemberAccessResolver).

@Trinition
Copy link

I've recently run into this limitation and would like to see this implemented.

@chester89
Copy link
Collaborator

please provides API examples of what you mean

@chester89
Copy link
Collaborator

I think I got it - there's no way in ComponentMap to do: Map(x => x.Name).Access.BackingField(), for example.
I'm not sure it's just an API that's missing. Need to dig further.

@chester89
Copy link
Collaborator

ok, I think I'm finally ready to answer this properly.
The reason I think that there are currently no way to configure how component members should be accessed is that in current version of Fluent, mapping components with fields, not properties, does not work. I can't say at the moment what's the problem - is it NHibernate, or Fluent, or both - but if you configure fields inside your ComponentMap derived class, - I did it using Member.Reveal - NHibernate will throw an exception at you about invalid mapping configuration. I will contact guys from NH team and ask them if that scenario is supported, and if it is - I'll do my best to extend an API to get this to work. So, when I get a meaningful info, I'll get back to this.

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

No branches or pull requests

3 participants