This question is locked. New answers and comments are not allowed.
Hi guys,
I just started to use the OpenAccess ORM. I want to understand better some designer logic.
My sample DB script (I'm using SQL Server 2008 Express):
CREATE TABLE Category |
( |
Id uniqueidentifier NOT NULL PRIMARY KEY, |
Name nvarchar(50) NOT NULL, |
Description nvarchar(max) NULL, |
) |
GO |
CREATE TABLE Product |
( |
Id uniqueidentifier NOT NULL PRIMARY KEY, |
Name nvarchar(255) NOT NULL, |
Description nvarchar(max) NULL, |
) |
GO |
CREATE TABLE Category2Product |
( |
ProductId uniqueidentifier NOT NULL FOREIGN KEY REFERENCES Product(Id), |
CategoryId uniqueidentifier NOT NULL FOREIGN KEY REFERENCES Category(Id), |
PRIMARY KEY (ProductId, CategoryId) |
) |
The table Category2Product is recognized as a collection. That is what I was expected. But, "Many to many" flag is not set by default (MS did it in their EF editor).
I suppose that the only reason of such tables is to define a many-to-many relation. Is "Many to many" flag not set for some reason? If so, please advice.
Additionaly, I could suggest to give by default more user-friendly names for field and inverse list. For my case the field name should be "products" and the inverse list name should be "categories".
Also, I noted that after switch from 'Collection' option to 'Map' and vice versa, combobox 'Owner Class', 'Many to many' flag and 'Inverse List Name' lose theirs value. I think it is not very user friendly, but, of course, nothing serious.
P.S. I closed 'Telerik ORM Wizard', but I got some visual artifact. See second attached picture.