I looked into this for a while (original group post
here<http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/617eeaa8fb31935d/c0cd57536e7c642a?lnk=gst&q=isaac#c0cd57536e7c642a>).
Basically, subclassing from an override doesn't work at all. I took a stab
at fixing it (branch is
here<https://github.com/icambron/fluent-nhibernate/tree/discriminate_in_overrides>,
though I'm not sure what state it's in), and wasn't able to make it work
within the timebox I had for it. In fact, it turned out to be really
complicated and probably the wrong approach, and I may have to start over.
In fact, after attacking it from a few different angles, I'm not even sure
it *should* be possible; the Subclass<> method deprecation is actually
right, but in the meantime we don't have any other solution. But I'll
probably have another go at it in case I missed something.

The specific error you're getting isn't hard to fix though, if I'm right
about what it is. Basically, AutoSubClassPart only takes a string
discriminator in the constructor for some reason, and the reflection code
that tries to find it is failing. My branch has a fix for that
here<https://github.com/icambron/fluent-nhibernate/commit/b94914453d87e2c3db014bfc371489a7e492344b#src/FluentNHibernate/Automapping/AutoSubClassPart.cs>,
and also some tests about it. OTOH, I suspect that if you pull out that fix,
it will only get you to the next failure.

TL;DR - mapping.Subclass<Child>(1, () => {}) is very broken.

-Isaac

On Tue, Sep 27, 2011 at 11:00 AM, James Gregory <[email protected]>wrote:

> Is it just foreign key naming you're doing, or more? Have you seen the
> ForeignKeyConvention base class? You might be able to use that instead; but
> either way, that class implements IJoinedSubclassConvention so it might give
> you some ideas.
>
> Documentation on this area is sparse; frankly, because it's crap.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/fluent-nhibernate/-/9H4Fa-MP1lwJ.
>
> 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.
>

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