[mapguide-users] Can't insert feature into certain SDFs
Takashige Nakagawa
ta-nakagawa at apptec.co.jp
Wed May 30 06:01:03 EDT 2007
Hi all.
I found it. That's the Studio's bug.
Test2.sdf contains no features. It's identity property
"Autogenerated_SDF_ID" is set to be autogenerated and read-only.
When it's loaded via Sutdio to e.g.
"Library://Samples/Data/Test2.FeatureSource", autogenerated and read-only
attributes are lost.
Insertion didn't work because the "Autogenerated_SDF_ID" was null (my code
skips the autogenerated property).
When it comes to Test.sdf, loading works. Test.sdf has 3 features.
Thanks Jason and Zak.
Regards.
Takashige Nakagawa
> Hi all.
>
> I've been testing my code which insert features into SDFs and it worked
> well
> so far.
> When it comes to certain SDFs, however, it wouldn't work.
> I can delete and update features of these SDFs, so "Read Only" issue seems
> not to have anything with this problem.
>
> All properties are nullable except one described below.
>
> <xs:element name="FeatId">
> <xs:simpleType>
> <xs:restriction base="fdo:int32" />
> </xs:simpleType>
> </xs:element>
>
> This is the key field to the feature. I assume the case of this problem is
> that this field value is not "auto-generated",
> because when the key field is like :
>
> <xs:element name="Autogenerated_SDF_ID" fdo:readOnly="true" minOccurs="0"
> fdo:autogenerated="true">
> <xs:simpleType>
> <xs:restriction base="fdo:int32" />
> </xs:simpleType>
> <xs:annotation>
> <xs:documentation>Autogenerated identity property</xs:documentation>
> </xs:annotation>
> </xs:element>
>
> I tried to set the key field into "auto-generated" by
> "MgDataPropertyDefinition::SetAutoGeneration() " method, but I couldn't
> make
> it so.
>
> Does anyone know how to solve this problem?
More information about the mapguide-users
mailing list