Hi all,

I have abstract Business, with concrete Manager and Client inheriting
from Business in table-per-subclass form.

My pre 1.0 RC code had an automap override for the Business entity
like so:

/* Manager Joined Subclass */
mapping.JoinedSubClass<Manager>("BusinessId")
       .HasManyToMany<Client>(x => x.Clients)
       .WithTableName("ManagersToClients")
       .WithParentKeyColumn("ManagerFk")
       .WithChildKeyColumn("ClientFk")
       .Inverse();

// Necessary, HasMany convention does not run for this entity
mapping.JoinedSubClass<Manager>("BusinessId")
       .HasMany(x => x.FullyManagedClients)
       .KeyColumnNames.Add("PrimaryManagerFk")
       .Inverse(); // Forward relationship is automapped

/* Client Joined Subclass */
mapping.JoinedSubClass<Client>("BusinessId")
       .HasManyToMany<Manager>(x => x.SecondaryManagers)
       .WithTableName("ManagersToClients")
       .WithParentKeyColumn("ClientFk")
       .WithChildKeyColumn("ManagerFk");

This worked fine. It created the correct bags in the joined-subclass
definitions, with correct name, table, and key column attributes along
with correct many-to-many column names.

Now, in 1.0 RTM code, I tried simply modifying the above code to match
the correct method calls (like WithTableName -> Table). It executes
but produces incorrect mappings. For example, the Manager Joined
Subclass output has a table attribute in the bag that is wrong for the
many-to-many. Meanwhile, what should be the one-to-many with key
column "PrimaryManagerFk", is mapped as an incorrect many-to-many as
well.

What's changed? Thanks.

Note: I am not using the 2 ManyToMany conventions at this point to try
and get my system up and running.

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