yasser777 / nettiers

Automatically exported from code.google.com/p/nettiers
0 stars 0 forks source link

Many-To-Many Relationships with Unique Guid column instead of PK #359

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create 2 Tables with the following columns :
    a) Primary int identity 
    b) Unique Guid
    c) Nvarchar(50)
2. Create Junction Table following columns :
    a) Primary key with the Guid from the two table
    b) Dummy int column 
3. Create relationship between the first table and Junction Table using Guid 
column
4. Create relationship between the second table and Junction Table using Guid 
column

What is the expected output? What do you see instead?
When you generate the code you will have synatx error :
in Data Access Layer project
in ProviderBaseCore class for the tow tables
in function DeepLoad
in // RelationshipType.ManyToMany

the code make use of int primary key column instead of Guid colum which used in 
the Junction Table .

Also in edit form the code make use of int primary column instead of Guid in 
Many-To-Many relationship

What version of .netTiers and CodeSmith are you using?
.netTiers : 2.3.0
CodeSmith : 5.2.2 Rev 11561

Original issue reported on code.google.com by khvb...@gmail.com on 15 Dec 2010 at 8:20

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

Can you please try reproducing this with the latest nightly build of .netTiers.

http://community.codesmithtools.com/nightly/NetTiers/nettiers-2.3-r864.zip

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 16 Dec 2010 at 9:02

GoogleCodeExporter commented 9 years ago
Still the same errors appears .

Every relationship M-to-M, that use Guid from the main tables in the Junction 
table
Will use the int primary key instead of the unique key that came from main 
tables

I think that the field came from main table instead of junction table .

Original comment by khvb...@gmail.com on 19 Dec 2010 at 12:21

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 29 Dec 2010 at 7:42