Actually I think this an FNH issue, or a lack of understanding of the
conventions at least.

 

I assume that you have an IClassConvention to apply the pluralizer.

This does what it says on the tin it only applies it to class maps or
AutoMaps not to joined subclasses.

You need to also implement an IJoinedSubclassConvention to get your
subclass tables pluralized, like so:

 

public class JoinedSubClassTableNameConvention :
IJoinedSubclassConvention

{

    public bool Accept(IJoinedSubclass target)

    {

       return true;

    }

 

    public void Apply(IJoinedSubclass target)

    {

 
target.WithTableName(Inflector.Net.Inflector.Pluralize(target.EntityType
.Name));

    }

}

 

From: [email protected]
[mailto:[email protected]] On Behalf Of James Gregory
Sent: 27 May 2009 09:00
To: [email protected]
Subject: [fluent-nhib] Re: nhibernate subclass problem

 

That'll be something for the #arch guys, I believe.

On Tue, May 26, 2009 at 10:01 PM, Rui Silvestre
<[email protected]> wrote:


from what I tested the problem is solved... the generated mapping file
was missing the column names and now is OK!

still there is another issue to be solved: the plurar table names that
i'm specifying by default are not being applied to the subclassed
entity... in my database I need to have a Child table instead of a
Children table or else the mappings fail... any ideas on that?


thank you very much...





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