Hi,

I am trying to do exactly this in an IJoinedSubclassConvention:

public void Apply(IJoinedSubclassInstance instance)
{
    instance.Key.Column(instance.EntityType.BaseType.Name + "Id");
    instance.Table(Inflector.Net.Inflector.Pluralize
(instance.EntityType.Name));
}

The first call does not work. There is no impact on the
instance.Key.Column property, nor does the output come out correctly.
In fact, instead of Name + "Id" I get Name + "Fk" which is probably
coming from my References, HasMany, or ForeignKey conventions!!!

God I'm having such an awful time getting JoinedSubclasses to work
switching from pre 1.0 RC to 1.0 RTM.

Thanks,
- Chris

On Dec 17 2009, 2:28 pm, Doron Yaacoby <[email protected]> wrote:
> Oh. Silly me for missing that. Thanks!
>
> On Dec 16, 12:51 pm, "Martin Hornagold"
>
> <[email protected]> wrote:
> > You need the Column method of the Key property, i.e.:
>
> >         Instance.Key.Column(COLUMN_NAME);
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[email protected]] On Behalf Of Doron Yaacoby
> > Sent: 16 December 2009 12:48
> > To: Fluent NHibernate
> > Subject: [fluent-nhib] Re: Convention for the key-column when using
> > table per subclass inheritance
>
> > I tried,
> > But the key property on IJoinedSubClassInstance (which is the object
> > that is passed to the convention's Apply method) is read-only.
>
> > Thanks,
> > Doron

-- 
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