Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 1.2.0
Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="PPEA.Donnees.Groupe, PPEA.Donnees" table="groupes">
<id name="ID" column="id" type="int" unsaved-value="0" >
<generator class="identity"/>
</id>
<property name="Nom" column="nom" type="String" length="255"/>
<property name="Description" column="description" type="String" length="510"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
ITransaction transaction = session.BeginTransaction();
PPEA.Donnees.Groupe obj = new PPEA.Donnees.Groupe(" TEST !");
obj.Description = "Description";
session.Save(obj);
transaction.Commit();
Full stack trace of any exception that occurs:
Unhandled Exception: NHibernate.MappingException: Unknown entity class: PPEA.Donnees.Groupe
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister (System.Type theClass) [0x00000]
at NHibernate.Impl.SessionImpl.GetClassPersister (System.Type theClass) [0x00000]
at NHibernate.Impl.SessionImpl.GetEntityPersister (System.Object obj) [0x00000]
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier (System.Object obj, NHibernate.Engine.CascadingAction action, System.Object anything) [0x00000]
at NHibernate.Impl.SessionImpl.Save (System.Object obj) [0x00000]
at Apprendre.MainClass.NHibernate () [0x00049] in /donnees/Documents/Projets/MonoDevelop/Apprendre/Apprendre/Apprendre/Main.cs:79
at Apprendre.MainClass.Main (System.String[] args) [0x000d6] in /donnees/Documents/Projets/MonoDevelop/Apprendre/Apprendre/Apprendre/Main.cs:56
Name and version of the database you are using:
SQLite 3
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I think everything is above ... For info, I'm using Mono 1.2.5.
I've check the content of my assembly ; PPEA.Donnees and I find the class PPEA.Donnees.Groupe ...