Those are not properties, but fields. I don't know if it's possible to
map to public fields, but it's a strange way to use C#.

On Thu, Sep 3, 2009 at 3:17 PM, bstack<[email protected]> wrote:
>
> Can you map directly to readonly properties in NHibernate or is it
> impossible? e.g.
>
>   public class Entity
>   {
>       public readonly int Property1;
>       public readonly int Property2;
>
>       public Entity(int p1, int p2)
>       {
>           this.Property1 = p1;
>           this.Property2 = p2;
>   }
>
> We dont want back-end fields in our entity e.g. private int_property1;
> (Too many entities to convert from current format)
>
> It dosen't look like any of the current PropertyAccessors that exist
> can cater for this usage.
> It is possible to write my own PropertyAccessor but would this
> "readonly" property type entity work with NHibernate?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to