Max length of string field

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
damon.cognito
Posts: 50
Joined: Wed 22 Jul 2009 09:30

Max length of string field

Post by damon.cognito » Wed 10 Nov 2010 11:30

Entity Framework
Postgresql 8.4
Latest DevartConnect for Postgresql

Have been trying to get the maximum length of a string field. I have used the code below which correctly returns the 'item' and finds the field 'Reference' (length 16) but the "MaxLength" is always null. Same on every other field. Am I doing something wrong?

Code: Select all

MetadataWorkspace workspace = entity.MetadataWorkspace;
object value = new object();
var item = workspace.GetItems(DataSpace.CSpace).Where  
                       (i => i.Name == "TblClientHead").Single();  
value = item.Properties.Where
                       (p => p.Name == "Reference").Single().TypeUsage.Facets["MaxLength"].Value;

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 11 Nov 2010 16:31

Thank you for the report, I have reproduced the issue.
I will let you know about the results of our investigation.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 12 Nov 2010 12:40

This problem is fixed in the latest Beta version of dotConnect for PostgreSQL. You can downoload this build from Registered Users' Area or the Trial version from the download page.

Post Reply