Have you tried updating your FNH?
On Fri, Jul 17, 2009 at 12:13 AM, Chris Fazeli <[email protected]> wrote:
>
> I'm looking to use a convention to have the automapper to recognize
> pluralized table names for joined subclasses.
>
> At the moment, with the latest build of FNH (in S#arp Architecture 1.0
> RTM r486), automapping requires that the joined subclass tables be
> singular named. Furthermore, the PrimaryKeyConvention I have is
> ignored, and the PKs are expected to be the name of the parent class,
> singularlized.
>
> Here's an example:
> Our database has a pluralized Businesses table with the "BusinessId"
> convention as the PK, and there are three inheriting tables that
> should each have PK "BusinessId" and pluralized table names. The
> matching domain entities all have singular names.
>
> I tried using this:
> public class JoinedSubclassConvention : IJoinedSubclassConvention {
> public bool Accept(IJoinedSubclass subclass) {
> return true;
> }
> public void Apply(IJoinedSubclass subclass) {
> subclass.WithTableName(Inflector.Net.Inflector.Pluralize
> (subclass.EntityType.Name));
> }
> }
>
> But WithTableName is Not Implemented. This also doesn't explain why my
> PrimaryKeyConvention is ignored for these joined subclasses.
>
> How do I get by this to have my PKs match the parent's PK, and my
> tables to be pluralized? Any help would be appreciated.
>
> Cheers,
> - 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
-~----------~----~----~----~------~----~------~--~---