zengcheng / codesmith

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

nvarchar(max) does not generate the DataType.MultilineText MetaData Attribute #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. A table with columns of type nvarchar(max)
2. Generate the dbml and entities with PLINQO
3. The DataType() Attribuite is not generated for these columns

What is the expected output? What do you see instead?
A [DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
Attribute should be generated for the corresponding property.

What version of the product are you using?
Latest download

Original issue reported on code.google.com by hai...@shopme.com on 24 Dec 2009 at 6:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Did not select the Framework in the initial post.

It is a PLINQO Issue.

Original comment by hai...@shopme.com on 25 Dec 2009 at 7:04

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 4 Jan 2010 at 4:01

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 7 Jan 2010 at 4:19

GoogleCodeExporter commented 9 years ago
I ran a test against a ms sql 2008 db which had an htmlbody and textbody column 
set 
to nvarchar(max). I was able to reproduce this issue in 3.0.x and 4.0.x. The 
patch 
submitted simply changes line 113 of the Entity.Editable.cst file setting the 
lower 
size boundary eval from size == -1 to size <=0.

The fix assumes that the user wants 
System.ComponentModel.DataAnnotations.DataType.Multiline to trump
System.ComponentModel.DataAnnotations.DataType.Html or any other more specific 
type.

Original comment by jon.k...@gmail.com on 28 Jan 2010 at 5:21

Attachments: