Ah, so I need the FindIdentity set up - doh! Ok, once that is set up,
do I still need to apply the PrimaryKeyConvention in order for the
mapping to be accurate?

Chris

On Aug 28, 11:02 am, James Gregory <[email protected]> wrote:
> Great, thanks.
> Your identity looks wrong to me, unless your automapping configuration
> caters for it.
>
> See:http://wiki.fluentnhibernate.org/Auto_mapping#Identities
>
> <http://wiki.fluentnhibernate.org/Auto_mapping#Identities>The automapper
> expects Ids to be called "Id".
>
>
>
> On Fri, Aug 28, 2009 at 3:46 PM, Chris Cyvas <[email protected]> wrote:
>
> > Hi James,
>
> > Here is my class. Do you see any glaring errors?
>
> > using System;
> > using System.Collections.Generic;
> > using System.CodeDom.Compiler;
>
> > namespace MyNameSpace {
>
> >        [Serializable]
> >        public partial class DatabaseConfiguration {
>
> >        #region Properties
>
> >        public int DatabaseConfigurationId { get; set; }
>
> >        public virtual string Name { get; set; }
>
> >        public virtual string Dialect { get; set; }
>
> >        public virtual string ConnectionDriver { get; set; }
>
> >        public virtual string CacheRegionPrefix { get; set; }
>
> >        public virtual string Server { get; set; }
>
> >        public virtual string InitialCatalog { get; set; }
>
> >        public virtual string UserId { get; set; }
>
> >        public virtual string Password { get; set; }
>
> >        #endregion
>
> >        }
> > }
>
> > On Aug 26, 4:29 am, James Gregory <[email protected]> wrote:
> > > I haven't been able to reproduce your issue. Can you show me your
> > entities?
> > > The identity conventions are applied
> > > here<
> >http://github.com/jagregory/fluent-nhibernate/blob/master/src/FluentN...>
> > > .
>
> > > On Wed, Aug 26, 2009 at 1:02 AM, Chris Cyvas <[email protected]>
> > wrote:
>
> > > > Hello,
>
> > > > I have pulled the latest (rev 614) to see if I could get this fixed
> > > > up, but no love. Here is my situation:
>
> > > > I have the following Convention section:
>
> > > >        .Conventions.Setup(convention =>
> > > >        {
> > > >          convention.Add<SystemClassConvention>();
> > > >          convention.Add<PrimaryKeyConvention>();
> > > >        });
>
> > > > The PrimaryKeyConvention is exactly as you have it here:
> > > >http://wiki.fluentnhibernate.org/Auto_mapping
>
> > > > But it won't fire. I get the SystemClassConvention to fire (although I
> > > > had to pull the latest for that - it didn't work in RC).
>
> > > > If I step through the code FNH will create an instance of it, but I'll
> > > > be darned if I can figure out where it actually gets applied. I
> > > > checked the unit test project and didn't see any tests that test this.
>
> > > > Any help is appreciated.
>
> > > > Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to