Problem solved. A typo what else could it be....
FirstName vs Firstname.. Thx anyway On Feb 14, 8:10 pm, Ayende Rahien <[email protected]> wrote: > there is zero relation between this property and the error message.Do you > HAVE a setter for the property? > > 2009/2/14 mantzas <[email protected]> > > > > > This is my implmentation > > > public virtual string Fullname > > { > > get > > { > > return String.Format("{0} {1}", _Firstname, > > _Lastname); > > } > > } > > > and this exception is thrown > > > NHibernate.PropertyNotFoundException : Could not find a getter for > > property 'Firstname' in class 'KeepItSimple.PManager.Entities.User' > > at NHibernate.Properties.BasicPropertyAccessor.GetGetter(Type type, > > String propertyName) in X:\NHibernate\nhibernate\src\NHibernate > > \Properties\BasicPropertyAccessor.cs:line 35 > > at NHibernate.Tuple.Entity.PocoEntityTuplizer.BuildPropertyGetter > > (Property mappedProperty, PersistentClass mappedEntity) in X: > > \NHibernate\nhibernate\src\NHibernate\Tuple\Entity > > \PocoEntityTuplizer.cs:line 75 > > at NHibernate.Tuple.Entity.AbstractEntityTuplizer..ctor > > (EntityMetamodel entityMetamodel, PersistentClass mappingInfo) in X: > > \NHibernate\nhibernate\src\NHibernate\Tuple\Entity > > \AbstractEntityTuplizer.cs:line 56 > > at NHibernate.Tuple.Entity.PocoEntityTuplizer..ctor(EntityMetamodel > > entityMetamodel, PersistentClass mappedEntity) in X:\NHibernate > > \nhibernate\src\NHibernate\Tuple\Entity\PocoEntityTuplizer.cs:line 32 > > at NHibernate.Tuple.Entity.EntityEntityModeToTuplizerMapping..ctor > > (PersistentClass mappedEntity, EntityMetamodel em) in X:\NHibernate > > \nhibernate\src\NHibernate\Tuple\Entity > > \EntityEntityModeToTuplizerMapping.cs:line 58 > > at NHibernate.Tuple.Entity.EntityMetamodel..ctor(PersistentClass > > persistentClass, ISessionFactoryImplementor sessionFactory) in X: > > \NHibernate\nhibernate\src\NHibernate\Tuple\Entity > > \EntityMetamodel.cs:line 276 > > at NHibernate.Persister.Entity.AbstractEntityPersister..ctor > > (PersistentClass persistentClass, ICacheConcurrencyStrategy cache, > > ISessionFactoryImplementor factory) in X:\NHibernate\nhibernate\src > > \NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 271 > > at NHibernate.Persister.Entity.SingleTableEntityPersister..ctor > > (PersistentClass persistentClass, ICacheConcurrencyStrategy cache, > > ISessionFactoryImplementor factory, IMapping mapping) in X:\NHibernate > > \nhibernate\src\NHibernate\Persister\Entity > > \SingleTableEntityPersister.cs:line 77 > > at NHibernate.Persister.PersisterFactory.CreateClassPersister > > (PersistentClass model, ICacheConcurrencyStrategy cache, > > ISessionFactoryImplementor factory, IMapping cfg) in X:\NHibernate > > \nhibernate\src\NHibernate\Persister\PersisterFactory.cs:line 51 > > at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, > > IMapping mapping, Settings settings, EventListeners listeners) in X: > > \NHibernate\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line > > 207 > > at NHibernate.Cfg.Configuration.BuildSessionFactory() in X: > > \NHibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1002 > > at KeepItSimple.PManager.Data.SessionManager..ctor() in X: > > \VS2008\Projects\Net\KeepItSimple\PManager\PManager.Data > > \SessionManager.cs:line 26 > > at KeepItSimple.PManager.Data.Test.ProjectProviderTests.SetupTests > > () in X:\VS2008\Projects\Net\KeepItSimple\PManager\PManager.Data.Test > > \ProjectProviderTests.cs:line 35 > > > On 14 Φεβ, 20:00, Ayende Rahien <[email protected]> wrote: > > > public virtual string FullName{ > > > get { return FirstName +" " + LastName; } > > > > } > > > On Sat, Feb 14, 2009 at 7:57 PM, mantzas <[email protected]> wrote: > > > > > Hi, > > > > > i have a class with first and last name. > > > > The values are mapped. > > > > > If i wish to create the Fullname Property that is simply the > > > > concatenation of these two, and i dont want to persist, how can i do > > > > it. > > > > > I tried but nhibernate expects a mapping for this property and throws > > > > a exception. > > > > > Thx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
