No, because null = no value for that property and if you try to get the property value from the Hashtable you will have a null that is exactly the values you are looking for.
On Mon, Apr 25, 2011 at 11:05 AM, Krishna Jetti <[email protected]>wrote: > Hello All, > > I need some help with dynamic component properties. > > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" > assembly="UPSLT.RTS.Server.Core.Domain" > namespace="UPSLT.RTS.Server.Core.Domain"> > <class name="ObjectA"> > <id name="EntityKey" > > <generator class="hilo" /> > </id> > <property name="Name" /> > <property name="Age" /> > <dynamic-component name="DynamicA" > > <property name="TestDynamic1 column ="TestDynamic1" > type="int32" /> > <porperty name ="TestDynamic2 column ="TestDynamic2" type > ="int32" /> > </dynamic-component> > </class> > </hibernate-mapping> > > and my class is > > Class ObjectA > { > public virtual long EntityKey {get; set;} > public virtual string Name {get; set;} > public virtual int Age {get; set;} > public virtual Hashtable DynamicA > { > get > { > _dynamicA = _dynamicA ?? new Hashtable(); > return _dynamicA > } > set > { > _dynamicA = value; > } > } > > private virtual Hashtable _dynamicA; > } > > > it works good, but when I have select the ObjectA from db, I see that > it generates the sql statement with dynamic properties but the > DynamicA doesn't include these properties if they are both null. > > Is there any setting to make Nhibernate include these properties even > when they are null? > > -- > 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. > > -- Fabio Maulo -- 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.
