These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: No Persister Found
PostPosted: Wed Oct 14, 2009 12:02 pm 
Newbie

Joined: Wed Oct 14, 2009 11:54 am
Posts: 1
I'm getting desperate trying to get a class to map. I just get "No persister found: ChickenPing.Core.Substitution". That class is in one assembly, and all of me NHibernate classes are in a difference assembly. I'd really appreciate any help, my code is below.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="ChickenPing.Core" namespace="ChickenPing.Core">
  <class name="ChickenPing.Core.Substitution, ChickenPing.Core" table="Subs">
    <id name="ID" column="ID">
      <generator class="guid"/>
    </id>
    <property name="Ingredient" column="ingredient"  not-null="true"/>
    <property name="Substitutes" column="substitutes" not-null="true"/>
    <property name="Measurement" column="measurement"/>
    <property name="Quantity" column="quantity"/>
  </class>
</hibernate-mapping>

namespace ChickenPing.Core {
public class Substitution {
        protected Guid id;
        protected string ingredient,
                       measurement,
                       substitutes;
        protected double? quantity;

        /// <summary>
        /// Gets or sets the database ID for this substitution.
        /// </summary>
        /// <value>The database ID for this substitution.</value>
        public virtual Guid ID {
            get { return id; }
            set { id = value; }
        }

        /// <summary>
        /// Gets or sets the ingredient name.
        /// </summary>
        /// <value>The name.</value>
        public virtual string Ingredient {
            get { return ingredient; }
            set { ingredient = value; }
        }

        /// <summary>
        /// Gets or sets the name of the unit used to measure this ingredient.
        /// </summary>
        /// <value>The name of the unit used to measure this ingredient.</value>
        public virtual string Measurement {
            get { return measurement; }
            set { measurement = value; }
        }


        /// <summary>
        /// Gets or sets the quantity of the ingredient.
        /// </summary>
        /// <value>The quantity.</value>
        public virtual double? Quantity {
            get { return quantity; }
            set { quantity = value; }
        }

        /// <summary>
        /// Gets or sets the substitutes which can be used for this ingredient.
        /// </summary>
        /// <value>The substitutes which can be used for this ingredient..</value>
        public virtual string Substitutes {
            get { return substitutes; }
            set { substitutes = value; }
        }

        /// <summary>
        /// Initializes a new blank <see cref="Ingredient"/>.
        /// </summary>
        public Substitution() {
...

The assembly is added when I create my configuration with:
Code:
config.AddAssembly(typeof(Substitution).Assembly);


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.