There is a known problem in SQL Server concerning unique constraints: it's not possible to create a unique constraint for a field which can hold multiple NULL values, even if all non-NULL values are unique. This is possible in Oracle.
Since LLBLGen Pro only looks if there is a unique constraint to determine if a relation is 1:1 or n:1, there is no way to create a 1:1 relation when needed.
For example, I have 2 tables: Product and Testsheet
"Product" records have a field "TestSheetID" (PK of Testsheet), but some products don't have a corresponding testsheet. This is actually a 1: (0,1) relation...
It would be nice to be able to do this in code:
ProductEntity myProduct = new ProductEntity(id);
if (myProduct.Testsheet != null)
{
// do something with the testsheet record
}
The point is: is it possible to force a relation to be 1:1 in LLBLGen Pro ?