AnantLabs / codesmith

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

Update Criteria.Generated.cst to enclose tablenames in brackets #542

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create table using a reserved word for the name
2.Since the tablename isnt enclosed in brackets an error is generated.
3.

What is the expected output? What do you see instead?

What version of the product are you using?

Please provide any additional information below.
The error would be avoided by simply adding brackets around the tablename in 
Criteria.Generated.cst

Original issue reported on code.google.com by eslater%...@gtempaccount.com on 18 Jan 2011 at 1:11

GoogleCodeExporter commented 9 years ago
Hello,

What is the name of the table that you are generating?

Original comment by bniemyjski on 19 Jan 2011 at 2:06

GoogleCodeExporter commented 9 years ago
User

Original comment by eslater%...@gtempaccount.com on 19 Jan 2011 at 2:18

GoogleCodeExporter commented 9 years ago
Hello,

I could not reproduce this behavior. Could you please attach your CodeSmith 
Generator Project file with your settings.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 19 Jan 2011 at 7:26

GoogleCodeExporter commented 9 years ago
I hope this is the file you were looking for?

Original comment by eslater%...@gtempaccount.com on 24 Jan 2011 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello,

Yes, this is what I was looking for.

Is there any chance you could send support the user table SQL schema and any 
associations to it. Do you have any custom namespace imports defined in these 
classes? I'm wondering if something else could be causing this because "User" 
is not defined as C# 
(http://msdn.microsoft.com/en-us/library/x53a06bb(v=vs.71).aspx) or Visual 
Basic (http://msdn.microsoft.com/en-us/library/ksh7h19t(v=vs.80).aspx) Keyword

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 27 Jan 2011 at 4:39

GoogleCodeExporter commented 9 years ago
The problem isnt that C# or VB defines it as a keyword.  It is SQL Server that 
defines it.  The same issue exists with a table named File.

Original comment by eslater%...@gtempaccount.com on 9 Feb 2011 at 1:25

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2128.

Fixed Issue 542: Update Criteria.Generated.cst to enclose tablenames in brackets

Original comment by bniemyjski on 9 Feb 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for the clarification. That makes much more sense now :). I have fixed 
this in the latest nightly build.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 9 Feb 2011 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 9 Feb 2011 at 10:14