Try fast search NHibernate

23 May 2009

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.

4 comments:

  1. There's way too much revealed in the above submission...'parent' and 'child' are clearly visible, exposing the submitters special secret business model of relating their objects together in a parent-child relationship...now we can steal that clever relationship model and rule the world with their business plan! HAHAHAHAHAHA!

    ReplyDelete
  2. The IP owner of that app must be furious! From me you'd be lucky to get

    "I am getting an error"

    ReplyDelete
  3. "When you have an issue in NHibernate please send us something like this"
    Well, I can understand that somebody might send something in like that: The nhibernate sample solution (http://nhforge.org/media/g/examples/default.aspx) isn't exactly what one needs if the problem is difficult to explain. I can also understand if somebody doesn't want to give away project details and I respect that.
    I think we need a better example solution which is extensible and gives a pretty good subsumption of the problems a developer faces when using nhibernate. Maybe we should insert the Cats/Kitten example from the nhibernate documentation into the test solution?

    ReplyDelete
  4. I will happy if somebody can create a simple and light project to test issues. What is important is that the test must work with "pure-NH-stuff" without any kind of others frameworks related with NH. NH's users are developers so a developer should know how recreate an issue to give, to another developer, the opportunity to fix it.
    I would spent time to fix the problem and not to understand your business.

    ReplyDelete