Looks like it's missing

вторник, 29 декабря 2015 г., 16:22:58 UTC+3 пользователь Trinition написал:
>
> Suppose I have a component mapped with a ComponentMap:
>
> public class PersonNameMap : ComponentMap<PersonName> {
>         public PersonNameMap() {
>             *Access.Property();*
>             
>             Map(x => x.FirstName, "FirstName")
>                 
> .Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore);
>             Map(x => x.MiddleName, "MiddleName")
>                 
> .Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore);
>             Map(x => x.LastName, "LastName")
>                 
> .Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore);
>         }
>     }
>
>
> I've specified it be accessed as a set/get property.  But suppose I have 
> two different entities, each with a person name, but one exposes it's 
> person name as a gettable-only property:
>
> public class Foo {
>     public PersonName Name { get; set; }
> }
>
> public class Bar {
>     public PersonName Name { get { return _name; } }
>     private PersonName _name;
> }
>
>
> This doesn't seem to be possible because the *ClassMap*'s 
> *Component(Expression) *method returns a *ReferenceComponentPart*, which 
> does not expose the fluent *Access* property.
>
> From my tenuous understanding, I don't think this should be impossible. 
>  Is this just missing from the fluent API?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at https://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.

Reply via email to