ssteenkiste / nettiers

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

Name clashes #287

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As per post http://community.codesmithtools.com/forums/t/10662.aspx.

There is a bug in the nettiers code that is generated which causes a name 
clash in the Data.SqlClient project. In my case I have a table called 
Parameter which clashed with the Data.SqlClient.Parameter type. This 
happened in the SqlParamterProviderBase.generated.cs file on the Find 
methods.  The returned type was TList<Parameter> when it should be 
TList<MyNamespace.Entities.Parameter>

I changed the SqlEntityProviderBase.generated.cst file to correct this 
issue. 
The change was FROM: 
        string collectionClassName = GetClassName(SourceTable, 
ClassNameFormat.Collection); 
TO: 
        string collectionClassName = GetClassName(SourceTable, 
ClassNameFormat.Collection).Replace(GetClassName(SourceTable), className);

I have attached the corrected file. 
If you need to reproduce the problem then you should be able to easily by 
creating a table called Parameter and generating the code using nettiers 
2.3.0. Apply the patch and the problem will be fixed.

Original issue reported on code.google.com by bniemyjski on 11 Mar 2010 at 10:40

Attachments:

GoogleCodeExporter commented 9 years ago
Please find attached a patch i created that resolves a heap of name clashes.

Original comment by CableGuy...@gmail.com on 10 May 2011 at 2:18

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for the patch, The team will review this patch before committing.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 18 May 2011 at 5:48