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;