发布网友 发布时间:2022-04-25 20:39
共2个回答
热心网友 时间:2023-10-15 01:05
<KeyField foreignField="assetIdentifier">assetIdentifier</KeyField></Key><!--加上下面注释的这一段后,就出现了错误:Error generating bean code from file UC_DEVICEFUNCTION.xml: Error in the Bean UC_DEVICEFUNCTION of Solution SMMS: Duplicated key assetIdentifier<Key foreignBean="UC_ENDDEVICEASSET" restrict="true"><KeyField foreignField="assetIdentifier">assetIdentifier</KeyField></Key><Key foreignBean="UC_METERASSET" restrict="true"><KeyField foreignField="assetIdentifier">assetIdentifier</KeyField></Key>--><Key foreignBean="UC_FIRMWARE" restrict="true"><KeyField foreignField="FirmwareId">currentFirmware</KeyField></Key></Keys> 补充: 这个 是 关于 HPSA 里面的 ,新建 Inventory的 xml的时候 需要用到的 补充: 同一个表中多个字段,既做主键又做外键的方法:<Keys><Key pk="true" unique="true"><Name>assetIdentifierAndEndDeviceFunctionId</Name><KeyField>assetIdentifier</KeyField><KeyField>EndDeviceFunctionId</KeyField></Key><Key foreignBean="UC_DEVICEFUNCTION" restrict="true"><KeyField foreignField="assetIdentifier">assetIdentifier</KeyField></Key><Key foreignBean="UC_DEVICEFUNCTION" restrict="true"><KeyField foreignField="EndDeviceFunctionId">EndDeviceFunctionId</KeyField></Key></Keys>补充: 同一个表中的同一个字段,既做主键又做外键的方法:<Keys><Key pk="true" foreignBean="UC_COMEQUIPASSET" includeBean="true" restrict="true"><KeyField foreignField="assetIdentifier">AssetID</KeyField></Key></Keys>补充: 同一个表中一个字段,既做主键又做多个表的外键的方法:在另外三张表里面分别定义assetIdentifier为外键,即分别在UC_ENDDEVICEASSET、UC_COMEQUIPASSET和UC_METERASSE中加上下面这个key<Keys><Key pk="true" foreignBean="UC_DEVICEFUNCTION" includeBean="true" restrict="true">热心网友 时间:2023-10-15 01:06
create table yuangong(--创建表名