You need to make sure you're instructing the automapper on how to find your
identity property, as it defaults to expecting them to be called Id. In your
case you need to modify the FindIdentity in the automapper setup.
Something like:
AutoPersistenceModel.
/* your mapping */
.WithSetup(s =>
{
s.FindIdentity = prop => prop.DeclaredType.Name + "Id";
});
On Wed, Apr 8, 2009 at 5:58 PM, JoseFR <[email protected]> wrote:
>
> I'm afraid that this is not possible.
> With the IIdConvention you could rename the column name but the
> property name must be just "Id".
> Please correct me if I'm wrong.
>
> On 8 abr, 07:32, nuffsaid <[email protected]> wrote:
> > Hello,
> >
> > This problem is a bit odd. I'll try to explain it as simple as
> > possible. :-)
> >
> > I'm using Automap, but overriding the Id column using IIdConvention
> > because I want a different naming standard. This is working, but
> > somehow I still get an Id column generated (as a normal property). My
> > entities does not have a column named just "Id", but it still turns up
> > in the mappings and in the generated schema. My entities look like
> > this:
> >
> > public class Foo
> > {
> > public Int64 FooId { get; private set; }
> >
> > }
> >
> > Anyone know what is going on? How can I get rid of the generated "Id"
> > column? Any help appreciated!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---