Hi all,

Looks like mapping of the following hierarchy is not working, am I
doing something wrong or is it a bug?

    public interface IClass1 : IIdentifiable
    {
    }

    public interface IClass1<T> : IClass1
    {
    }

    public class Class1<T> : IClass1<T>
    {
        public long Id { get; set; }
    }

    public class Class2 : IIdentifiable
    {
        public long Id { get; set; }
        public IClass1 Property1 { get; set; }
    }

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="NHibernate.Test"
namespace="NHibernate.Test.NHSpecificTest.NH20xx">
        <class name="IClass1" table="iclass1">
                <id name="Id">
      <generator class="increment" />
    </id>
    <subclass name="IClass1`1[System.Int32]" discriminator-
value="iclass1_int" >
      <subclass name="Class1`1[System.Int32]" discriminator-
value="class1_int" >
      </subclass>
    </subclass>
  </class>

  <class name="Class2" table="class2">
    <id name="Id">
      <generator class="increment" />
    </id>
    <property name="Property1" />
  </class>
</hibernate-mapping>


I'm getting the following exception:

12:16:44,296 ERROR TestCase:101 - Error while setting up the test
fixture
NHibernate.MappingException: Could not determine type for:
NHibernate.Test.NHSpecificTest.NH20xx.Class1`1[[System.Int32,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]], NHibernate.Test,
Version=3.0.0.1001, Culture=neutral, PublicKeyToken=null, for columns:
NHibernate.Mapping.Column(Property1)
   at NHibernate.Mapping.SimpleValue.get_Type() in D:\src\nhibernate
\src\NHibernate\Mapping\SimpleValue.cs:line 239
   at NHibernate.Test.TestCase.ApplyCacheSettings(Configuration
configuration) in D:\src\nhibernate\src\NHibernate.Test
\TestCase.cs:line 319
   at NHibernate.Test.TestCase.Configure() in D:\src\nhibernate\src
\NHibernate.Test\TestCase.cs:line 226
   at NHibernate.Test.TestCase.TestFixtureSetUp() in D:\src\nhibernate
\src\NHibernate.Test\TestCase.cs:line 84

NHibernate.MappingException: Could not determine type for:
NHibernate.Test.NHSpecificTest.NH20xx.Class1`1[[System.Int32,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]], NHibernate.Test,
Version=3.0.0.1001, Culture=neutral, PublicKeyToken=null, for columns:
NHibernate.Mapping.Column(Property1)
at NHibernate.Mapping.SimpleValue.get_Type() in SimpleValue.cs: line
239
at NHibernate.Test.TestCase.ApplyCacheSettings(Configuration
configuration) in TestCase.cs: line 319
at NHibernate.Test.TestCase.Configure() in TestCase.cs: line 226
at NHibernate.Test.TestCase.TestFixtureSetUp() in TestCase.cs: line
102

Thanks in advance,
Gena

--

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.


Reply via email to