A couple notes...

If the breaking change is desirable, seems like V3 is a great place to do
it.  Aside from the change to the interface, the actual changes to
NHibernate are tiny.

I didn't analyze how easy #1 would be to implement, but #2 is trivial to
implement and doesn't impose a significant burden on the end user... they
need to make one method with a single line of code that passes a true-filled
array to their second function.  For people upgrading from old versions of
NHibernate, they can just ignore the "settable" array and the behavior will
be no different than before.  When they want to provide full support, they
just need to make use of the array.

        Patrick Earl

On Sun, Oct 24, 2010 at 8:33 PM, Patrick Earl <[email protected]> wrote:

> ICompositeUserType seems to be broken when dynamic-update is true.  It
> is missing the NullSafeSet override with bool[] settable as an
> argument.  This causes it to break when there parameters that have
> been replaced with "is null" elsewhere, and there are no parameter
> slots to actually fill.  Here are some potential fixes:
>
> 1.  Break ICompositeUserType and add the bool[] settable argument.
> 2.  Break ICompositeUserType and add a separate method with the bool[]
> settable argument.
> 3.  Make a new interface such as ICompositeUserTypePartialSetter and
> add the appropriate method to that.
>
> Although ICompositeUserType works in most cases (obviously), I'd still
> argue that it's fundamentally broken since types created with it will
> break in surprising ways that the user has no control over.  It
> doesn't make sense to me as a user that my type should break suddenly
> if dynamic-update is utilized.  I'd propose that #1 is the best
> solution from the "future user" perspective.
>
> Thoughts on how to undo this unfortunate brokenness?
>
>         Patrick Earl
>

Reply via email to