Hi, Thanks for replying
I just uploaded some extra information to the bug report. Here is a direct link: https://nhibernate.jira.com/secure/attachment/14074/strange.pdf I'm trying to play now with accessors... On Sep 6, 3:54 pm, Asher Newcomer <[email protected]> wrote: > I'm not sure of the cause of your problem, but the proxies can access > private fields/properties using some reflection tricks. > > > > > > > > On Tue, Sep 6, 2011 at 9:51 AM, kriebb <[email protected]> wrote: > > Hi, > > > I thought that also, > > > But, even when it's protected (or private), the field is filled up! > > But when I try to access the field, using my getter property, I gives > > me a null value back :( > > > On Sep 6, 3:20 pm, Ricardo Peres <[email protected]> wrote: > > > I think the field must be protected, not private, so that subclasses > > > (proxies) can access it. > > > > On Sep 6, 2:08 pm, kriebb <[email protected]> wrote: > > > > > bug posted... ? unless someone else got an idea? > >https://nhibernate.jira.com/browse/NH-2873 > > > > > On Sep 6, 11:02 am, kriebb <[email protected]> wrote: > > > > > > I think I'm missing something, I hope someone can take the time to > > > > > explain. > > > > > > Again, I've taken a lot of time searching, but I cannot find a > > > > > solution: > > > > > > Take the following mapping and imangine that the OrderInitiator class > > > > > has a Code property. > > > > > > <class name="Pdc.Erp.Domain.OrderManagement.AbstractOrder" > > > > > table="GeneralOrder" abstract="true" > > > > > > ... > > > > > <component name="OrderInitiator" access="nosetter.camelcase" > > > class="Pdc.Erp.Domain.OrderManagement.Components.Order.OrderInitiator" > > > > > > </component > > > > > </class> > > > > > > In the AbstractOrder.cs i have the following: > > > > > > protected OrderInitiator orderInitiator; > > > > > > public virtual OrderInitiator OrderInitiator {get { return > > > > > orderInitiator = orderInitiator ?? new OrderInitiator()} > > > > > set{orderInitiator = value;} > > > > > > If I want to access the OrderInitiator Property, the field is being > > > > > filled up ok as NH3.2.0 should do, but when I access the > > > > > OrderInitiator property with code 20, it gives me the new > > > > > OrderIntiator() with a null code. > > > > > > My guess is that something is happening with the proxy, it override > > > > > the virtual property and does not know that it should return the > > > > > backend field...., but I defined it with access="nosetter.camelcase". > > > > > > It makes no difference if I put the acces="field". > > > > > > Does someone know what I'm doing wrong or does it seems like a bug > > and > > > > > post it to Jira? > > > -- > > 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. -- 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.
