Hello everyone.

I'm trying make an entity containing a dictionary with their texts in
several languages. To do this I created the product class that
contains this simple properties:

----------------
public virtual string Name { get; set; }
public virtual IDictionary<Culture, CultureText> CultureTexts
{
  get { return cultureTexts; }
  protected set { cultureTexts = value; }
}
private IDictionary<Culture, CultureText> cultureTexts = new
Dictionary<Culture, CultureText>();
----------------

and a CultureText class that contains this:

----------------
public virtual string Description { get; set; }
public virtual string OtherDetails { get; set; }
----------------

The mapping is as follows:

  <class name="Product">
    <id name="Id">
      <generator class="native">
        <param name="sequence">Product_Sequence</param>
      </generator>
    </id>
    <property name="Name" length="150" not-null="true" />
    <map name="CultureTexts" table="Product_i18n" lazy="false">
      <key column="ProductId" not-null="true" />
      <map-key-many-to-many column="CultureId" class="Culture" />
      <composite-element class="ProductText">
        <property name="Description" length="250" />
        <property name="OtherDetails" length="250" />
      </composite-element>
    </map>
  </class>

The problem is that when the texts are null (both properties)
collection is not loaded and errors begin to occur.

I found this bug in Hibernate: 
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3836

There seems to be the same problem with NHibernate.

Someone can help me with this problem? (some workaround)

Thanks in advance

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

Reply via email to