Dear Support,
We are still using 2.1 and would like to report two bugs related to "1 to 0..1" relationships. I understand that you are currently busy with 3.0. However, as a licensed 2.1 user, I expect that 2.1 will still be supported until its end-of-life.
Both bugs appear when generating SQL server DB using nHibernate mold. The error message is "Error while tring to write changes into your database, Error Details: Length cannot be less than zero. Parameter name: length See output window for more details". The output showed that the 1 to 0..1 DB constraint is not generated.
1. Define a Parent with Sid (Int32, Indentity); a Child inherited from Parent with Text1 (string) and an Friend with Sid (Int32 primary key). The Child is having a 1 to 0..1 relationship with the Friend (target). The error above will appear. If we define the Firend before the Parent & Child, there will be no error and DB constraint can be generated.
2. Define a Parent with Sid (Int32, Primary key); a Child inherited from Parent with Text1 (string) and an Friend with Sid (Int32 Identity). Friend is having a 1 to 0..1 relationship with Parent (target). No mater how we swap the sequence of drawing these entities, the error will appear.
Regards,
Michael Leung