Jeff-Lewis / codesmith

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

DeepLoad = false Settings return incomplete schema information #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a weird one.  I am getting different results depending on my method. 

What steps will reproduce the problem?
1. Create a dbo.Customer table (Id, Name)
2. Create a dbo.Lender table (Id, CustomerId, Name)
3. Create a Schema named Test
4. Create a Test.Lender table (Id, CustomerId, Name)
5. Generate

What is the expected output? What do you see instead?
I have played around with this particular issue for awhile, but I get 
different results.  If I generate using the CSharp Dbml template, I get some 
weird stuff in the associations it generates.  For example off of the 
Customer Table I get the following Association:

<Association Name="Customer_Lender" Member="LenderList" 
Storage="_lenderList" ThisKey="Id,Id" OtherKey="CustomerId,CustomerId" 
Type="Lender" />

If I load up the Plinqo.sln file and run the generator, it handles naming 
the associations correctly.

<Association Name="Customer_Lender1" Member="Lender1List" 
Storage="_lender1List" OtherKey="CustomerId" Type="Lender1" />

What version of the product are you using?
Latest from svn

Please provide any additional information below.
I have included the schema for the database that I am experiencing this 
problem with.

The renaming of associations and schema'd objects is an OK solution and one 
that I will use if I have too, but I would like a better way to segregate 
objects via schema.  I realize this is a limitation of LinqToSql right now, 
but I am interested in hearing about any ideas you guys have about solving 
this.

Original issue reported on code.google.com by likwid on 17 Oct 2008 at 11:32

Attachments:

GoogleCodeExporter commented 9 years ago
Just got done talking to Jeff, he figured out that the issue is that the schema 
being
returned from SqlSchemaProvider is different depending on the DeepLoad settings.

Original comment by ejsm...@gmail.com on 20 Oct 2008 at 10:22

GoogleCodeExporter commented 9 years ago
I am going to create another issue to seperate these two things out.

There are two problems, 1 is that DeepLoad=false returns partial schema 
information.
The second problem is that Plinqo doesn't handle multiple schema (with the same 
table 
name in both schemas) correctly.

I will create another case for this now.

Original comment by likwid on 20 Oct 2008 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by ejsm...@gmail.com on 20 Oct 2008 at 10:36

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 21 Oct 2008 at 1:29

GoogleCodeExporter commented 9 years ago
This is fixed in the latest build of CodeSmith 
(http://codesmithtools.com/download/builds/codesmithprofessional-50-build.msi).

Original comment by bniemyjski on 21 Oct 2008 at 6:12