The unidirectional one-to-many is a base feature of NH since 1.2 or
before...

What you are watching is a special case, exactly to manage and optimize the
case when the FK is not-nullable.
Instead INSERT+UPDATE, as managed for no-mandatory unidirectional
one-to-many (where the "item" side may have its own lifecycle), the case
for mandatory unidirectional one-to-many (FK not-nullable) works with
INSERT directly using a "fake" property for the backref to the parent.

On Mon, Aug 6, 2012 at 11:10 AM, Alexander I. Zaytsev <
[email protected]> wrote:

> Hi, all
>
> As you may know NH since 3.2 supports uni-directional one-to-many
> associations.
>
> This was done by these commits
>
>
> https://github.com/nhibernate/nhibernate-core/commit/cb60f2169e7504ff83e601c555e42171f28ef9ff
>
>
> https://github.com/nhibernate/nhibernate-core/commit/d6cc06bbfee56fc3ae224fdfdc862df4fdff0442
>
> I wonder why this fix is applied only to keys with 
> *not-null="true"*attribute? I've checked and it seems that all works 
> perfectly without
> checking that key is not nullable.
>
> As I understand the fix was ported from Hibernate, because there I've
> found exactly the same code.
>



-- 
Fabio Maulo

Reply via email to