Print Page | Close Window

Why are the Max Lengths not being populated

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1364
Printed Date: 21-Sep-2025 at 7:58pm


Topic: Why are the Max Lengths not being populated
Posted By: skingaby
Subject: Why are the Max Lengths not being populated
Date Posted: 07-Jul-2009 at 2:08pm
I have an Oracle database and am using the Devart dotConnect drivers.
The EDMX file has the following type defined:
<EntityType Name="DEAL">

<Key>
    <PropertyRef Name="DEAL_ID" />
</Key>
<Property Name="DEAL_ID" Type="int64" Nullable="false" StoreGeneratedPattern="Identity" />
<Property Name="DATE_ENTERED" Type="DATE" Nullable="false" />
<Property Name="CONTACT_OTHER" Type="VARCHAR2" MaxLength="50" />

<EntityType Name="Deal">

<Key>
    <PropertyRef Name="DealId" />
</Key>
<Property Name="DealId" Type="Int64" Nullable="false" ib:BindableMode="OneWay" ib:DisplayName="Deal Id" />
<Property Name="DateEntered" Type="DateTime" Nullable="false" />
<Property Name="ContactOther" Type="String" />

<MappingFragment StoreEntitySet="DEALs">

<ScalarProperty Name="DealId" ColumnName="DEAL_ID" />
<ScalarProperty Name="DateEntered" ColumnName="DATE_ENTERED" />
<ScalarProperty Name="ContactOther" ColumnName="CONTACT_OTHER" />


Notice the last field, CONTACT_OTHER has a MaxLength of 50. However, the Object Mapper is not picking it up and a corresponding verifier is not being created:

#region ContactOther


/// <summary>Gets or sets the ContactOther.</summary>
[IbUtil.DBDataType(typeof(String))]
public String ContactOther {
   get { return ContactOtherEntityProperty.GetValue(this); }
   [global::System.Diagnostics.DebuggerNonUserCode]
   set { ContactOtherEntityProperty.SetValue(this, value); }
}
#endregion ContactOther


Why is this happening? How can I fix this? I would like to have the verifier's so the UI can work properly. Thanks!



Replies:
Posted By: skingaby
Date Posted: 13-Jul-2009 at 3:06pm
Did this get lost in the shuffle? Has anyone had a chance to figure out why this is happening?


Posted By: kimj
Date Posted: 14-Jul-2009 at 2:15pm
The Object Mapper only looks at the conceptual model - the CSDL section of the EDMX.  In your model the MaxLength attribute has not been carried through from the storage model (SSDL) to the conceptual model.  Check with Devart for product updates.


Posted By: skingaby
Date Posted: 17-Sep-2009 at 8:06pm
Devart has updated their Oracle driver and the 5.25.42 version now copies the MaxLength from the Storage model to the Conceptual model, where IdeaBlade can pick it up.



Print Page | Close Window