Hi

I am working on a project where we use middlegen to generate the 
hibernate objects based on an existing DB2 database. But we experience 
an error in the generation occurs.

For two tables ORG_UNIT and LEVEL there are two 1-M relationships from 
ORG_UNIT to LEVEL named:

        org_unit_id1 and
        org_unit_id2

they represent an organisational hierarchy, which can be traversed.

The problem is that middlegen does not name this as two simple 1-M 
relationships. So instead of generating this

relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1.T_LEVEL-has-T_ORG_UNITByOrgUnitId1.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1.T_LEVEL-has-T_ORG_UNITByOrgUnitId1.target-many=false
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1.T_ORG_UNIT-has-T_LEVELByOrgUnitId1.enabled=tru
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1.T_ORG_UNIT-has-T_LEVELByOrgUnitId1.target-many=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2.T_LEVEL-has-T_ORG_UNITByOrgUnitId2.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2.T_LEVEL-has-T_ORG_UNITByOrgUnitId2.target-many=false
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2.T_ORG_UNIT-has-T_LEVELByOrgUnitId2.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2.T_ORG_UNIT-has-T_LEVELByOrgUnitId2.target-many=true
 


it generates this

relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1.T_LEVEL-has-T_ORG_UNITByOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1.T_LEVEL-has-T_ORG_UNITByOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1.target-many=false
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1.T_ORG_UNIT-has-T_LEVELByOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1-org_unit_id_1.T_ORG_UNIT-has-T_LEVELByOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1AndOrgUnitId1.target-many=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2.T_LEVEL-has-T_ORG_UNITByOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2.T_LEVEL-has-T_ORG_UNITByOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2.target-many=false
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2.T_ORG_UNIT-has-T_LEVELByOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2.enabled=true
relations.T_ORG_UNIT-T_LEVEL-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2-org_unit_id_2.T_ORG_UNIT-has-T_LEVELByOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2AndOrgUnitId2.target-many=true
 




Does anybody have any suggestion on how to fix this kind of problems?

thomas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
middlegen-user mailing list
middlegen-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to