I've been tasked with creating a fairly complex system in sharepoint 2010. Coming from a background of from-scratch .NET applications, I'm used to defining tables with their own "local" columns.
My approach to this sharepoint project however, is leaving me with the sense, I'm doing something wrong.
I fired up VS2010 and started making content types, for which I want to make list definitions, and then list instances, so my entire "database" of sharepoint lists will be created at the flick of a feature. (Please stop me, if I'm going about this the wrong way)
Now, in creating my content types, I'm defining my < fields> right above my < ContentType> like so:
<Field ID="{GUID]" Name="UserLookup" DisplayName="User" Type="Lookup" FieldRef="ID" ShowField="ID"></Field>
<ContentType ID="0x01004df1f9fc39ee49569a3dfc2967f81f64"
...>
<FieldRefs>
<FieldRef ID="{GUID}" Name="UserLookup" DisplayName="User"/>
</FieldRefs>
I have no problem getting this to work. However, when I create my other content types and lists, they're going to need some of the same fields, but not necessarily be the exact same field - it might just be the name and type that's similar. But since these fields are created as a site column, no two can have the same name. It's like they're "global".
Is there no way to create a content type with fields defined JUST for that content type? Allowing other content types fields with the same name, but different definitions?