google-code-export / dblinq2007

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

MySql Code Generation: Column names with leading digit produce invalid C# #198

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new MySql table with a single column named "1ForTheRoad" (any 
type)
2. Run DBMetal Against the database to generate proxy classes

What is the expected output? 
Proxy code is generated with a property name that is valid in C#

What do you see instead?
Resulting code is invalid due to property "1ForTheRoad" starting with a 
number.

What version of the product are you using? On what operating system?
Latest Trunk (as of 2/09/2010)

Original issue reported on code.google.com by jared.m....@gmail.com on 9 Feb 2010 at 3:31

GoogleCodeExporter commented 9 years ago
I've included a .patch file that fixes this issue in the latest trunk build.

Original comment by jared.m....@gmail.com on 9 Feb 2010 at 3:34

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1311.

Original comment by jonmpr...@gmail.com on 10 Mar 2010 at 7:54

GoogleCodeExporter commented 9 years ago
I took the "easy" way out and instead of replacing the digits with their 
numerical 
equivalent I just prefixed with underscore, thus a column of 1ForTheRoad 
becomes 
_1ForTheRoad, and 12DancersDancing becomes _12DancersDancing (instead of 
One2DancersDancing, as the patch would have done).

Thanks for the patch!

Original comment by jonmpr...@gmail.com on 10 Mar 2010 at 7:55

GoogleCodeExporter commented 9 years ago
Closing.

Original comment by jonmpr...@gmail.com on 9 Apr 2010 at 7:54