我有一个枚举类型:
<items>
<enumtypes>
<enumtype code="FuelEnumeration" generate="true" autocreate="true" dynamic="true">
<value code="diesel"></value>
<value code="gasoline"></value>
<value code="ethanol"></value>
</enumtype>
</enumtypes>
这里是项目类型:
<itemtypes>
<itemtype code="Car" extends="Product" autocreate="true" generate="true">
<attributes> ... <attribute qualifier="fuel" type="FuelEnumeration">
<description>Fuel for this car</description>
<persistence type="property"></persistence>
</attribute>
我想在枚举类型和项目类型之间创建一对多关系,以便一辆汽车可以具有多个FuelEnumeration,我该怎么做?
<collectiontype code="fuelEnumColl"
elementtype="FuelEnumeration" autocreate="true" generate="true"
type="list" />
然后参考您的物品类型。
<attribute qualifier="fuel" type="fuelEnumColl">