Question to 1:1 relation
Posted: Thu 20 Jan 2011 14:48
Hey
I use your latest Components for mySQL in VB.NET 2010
I have created a 1:1 relation for LinQ2MySQL.
In this example I would have a 1:1 relation between Customers and Orders
When running the following LinQ Statement:
Dim Answer = From Query in myDataContext.Customers
LL.DataSource = Answer
Where LL is a 3rd party program, for printing.
When there is a relation, everything works fine. But if the customer has NO Order, then an exeption is thrown, which says, that the ID of the Order can't be NULL (would be right, because the ID field is the primary key of the table)
So, is this a problem in your product? or is this a wanted behaivor, that a 1:1 relation always have to have a child?
Hope you understand - THX
I use your latest Components for mySQL in VB.NET 2010
I have created a 1:1 relation for LinQ2MySQL.
In this example I would have a 1:1 relation between Customers and Orders
When running the following LinQ Statement:
Dim Answer = From Query in myDataContext.Customers
LL.DataSource = Answer
Where LL is a 3rd party program, for printing.
When there is a relation, everything works fine. But if the customer has NO Order, then an exeption is thrown, which says, that the ID of the Order can't be NULL (would be right, because the ID field is the primary key of the table)
So, is this a problem in your product? or is this a wanted behaivor, that a 1:1 relation always have to have a child?
Hope you understand - THX