“M”: Attributes/Annotations
AAguiar asked me a question related to my EDM 3.0: Bring EDM and “M” together post that I wanted to answer here.
@douglasp In .edmx I could add attributes in my own namespace to enrich my model. How is that going to work with ‘M’?
In the latest CTP you can add attributes/annotations for “M” types, extents, fields, functions.
Below is a simple example. Note the SQL that is generated by default, but you can control that as well.

hi doug,
this…
##Docs {description => “foo type”}
type foo
{
id :Integer32;
}
##Docs {description => “bar type”}
type bar
{
id :Integer32;
}
gives me…
empty 0,0 Error M2034 The entity field ‘About’ requires a membership constraint (’in’ or ‘<=’).
am i missing something?
cheers
tim
18 Dec 09 at 05:28
yes. you need to put an identity on the type. that is how we wire-up the attribute to the type or extent def.
##Docs {description => “bar type”}
type bar
{
id :Integer32;
} where identity id
douglasp
18 Dec 09 at 18:52