hay7777 wrote:
Hi,
Finally got middlegen hibernate plug-in working, and loaded up an existing database.
The current application code was handling the foreign key relationships, but I would like to change this when I rearchitect everything and employ hibernate.
Obviously, no relationships are showing in the GUI, but I can't find a way to add them! Can anyone point me in the right direction?
Many thanks,
David
PS Using SAPDB 7.4
If you want to add a new linkage, that is quite easy (i guess). To define a new linkage from alu_nokey to alu_nokey_xref, something like this within middlegen task should work.
<table name="alu_nokey" pkcolumnsoverride="col1,col2">
<crossref fktable="alu_nokey_xref" fkcolumn="pk1" pkcolumn="col1"/>
<crossref fktable="alu_nokey_xref" fkcolumn="..." pkcolumn="..."/>
</table>
where:
table alu_nokey columns: (no any primary keys defined for this table)
col1
col2
col3
col4
table alu_nokey_xref columns: (primary key constraints are pk1, pk2)
pk1
pk2
col1
col2
see linkage created by middlegen as:
http://home.comcast.net/~albert.lu/publ ... ossref.JPG
(pkcolumnsoverride needs new src from cvs not from sourceforge download page)