Welcome Guest! To enable all features please Login or Register.



How to map a logical type to an EDM data type
#1 Posted : Wednesday, August 1, 2012 4:07:32 PM(UTC)

Normally if you extend your logical type from another base type in the model, it will automatically inherit the mapping to the Entity Data Model type from its parent. If your type does not extend any other logical type, or you just want to override the mapping to EDM type, then the following steps outline this process.
  1. Make sure that the module element that contains your logical type declares a prefix for the "http://www.xomega.net/edm" namespace, e.g. xmlns:edm="http://www.xomega.net/edm"
  2. Add a edm:type element inside of the config element of your logical type definition. In the absence of such element your logical type will just inherit the EDM type from its base type if one exists.
  3. Set the Type attribute by selecting the EDM type from the list or by entering your own type.
  4. To specify the character length facet you need to set the size attribute on the parent logical type. For all other type facets, you can add them as additional attributes, e.g. Precision or Scale, etc.
  5. To validate your setup find a field that uses your logical type and then generate the Entity Data Model and check the type of the corresponding properties.

Here is a sample configuration that illustrates these steps.
<module xmlns="http://www.xomega.net/omodel"
    <type name="mileage rate" base="money">
        <edm:type Type="Double" Scale="5" Precision="4"/>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.