Logo

NHibernate

The object-relational mapper for .NET

TOP SECRET

When you have an issue in NHibernate please send us something like this

public class xparent
{
    public virtual long? Id { get; set; }
    public virtual long? A { get; set; }
    public virtual Iesi.Collections.Generic.ISet<xchild> Children { get; set; }
}
public class xchild
{
    public virtual long? Id { get; set; }
    public virtual long? B { get; set; }
    public virtual xparent Parent { get; set; }
}

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-cascade="save-update">
    <class name="xxx.xparent, xxx" table="xparent">
        <id name="Id" column="Id" type="Int64">
            <generator class="identity"/>
        </id>
        <property name="A" type="Int64"/>
        <set name="Children" inverse="true">
            <key column="ParentId"/>
            <one-to-many class="xxx.xchild, xxx"/>
        </set>
    </class>
    <class name="xxx.xchild, xxx" table="xchild">
        <id name="Id" column="Id" type="Int64">
            <generator class="identity"/>
        </id>
        <property name="B" type="Int64"/>
        <many-to-one name="Parent" column="ParentId" class="xxx.xparent, xxx"/>
    </class>
</hibernate-mapping>

And please don’t send me the code to recreate the issue because it is TOP SECRET, send me only the stack trace of the exception or even better an obfuscated dll and obviously don’t forget to use the nullable type for the Id.

Thanks.


Posted Wed, 27 May 2009 04:14:47 AM by fabiomaulo
Filed under:

comments powered by Disqus
© NHibernate Community 2024