WithSetup is for configuring the conventions that the automapper uses to
discover the properties on your entities. If your property is Id but your
column is TableNameId, then that is not what you want.
http://wiki.fluentnhibernate.org/show/AutoMappingConventions

That page on the wiki shows pretty much the exact thing you need. About
halfway down, PrimaryKeyConvention.

On Fri, Mar 13, 2009 at 4:20 PM, styx31 <thomas.bo...@gmail.com> wrote:

>
> Mhh, perhaps with .WithSetup :
>
> .WithSetup(a => a.FindIdentity = p => p.Name == p.DeclaringType.Name +
> "Id");
>
>
> On Mar 13, 5:15 pm, styx31 <thomas.bo...@gmail.com> wrote:
> > I'm discovering FluentNHibernate & AutoPersistenceModel, and I've
> > encountered a problem due to recent changes in the trunk.
> >
> > I simply want to create a convention for my database since we use :
> > - <Table>Id as primary key column name
> > - <ForeignTable>Id as foreign key column name
> >
> > I've read the Units tests, default code, and the wiki, but could not
> > find how to implement a convention for my first case. (for the second
> > case, I've found the ReferenceForeignKeyConvention, which I should
> > replace with my own one).
> >
> > Thanks,
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to