have tried:
Code:
<set name="relResources" table="RELRESOURCE">
<key column="RESOURCEID1"
not-null="true"
foreign-key="mykey2"/>
<many-to-many column="RESOURCEID2"
class="Resouce"
foreign-key="mykey3"/>
</set>
which generates decent looking alter statement but still missing a mapping between the RESOURCEID2 column in the RELRESOURCE table and the RESOURCEID column of the RESOURCE table (see result below from SchemaExportTask):
Code:
alter table RELRESOURCE
add constraint mykey2 foreign key (RELRESOURCEID1)
references RESOURCE;
alter table RELRESOURCE
add constraint mykey3 foreign key (RELRESOURCEID2)
references RESOURCE;
instead i want:
Code:
alter table RELRESOURCE
add constraint mykey2 foreign key (RELRESOURCEID1)
references RESOURCE (RESOURCEID);
alter table RELRESOURCE
add constraint mykey3 foreign key (RELRESOURCEID2)
references RESOURCE (RESOURCEID);
[/code]