( case when type2.AB_OBJECTRELATIONTYPEID is null then main.OBJECT_TYPE "+// if type is 'same' (type2.AB_OBJECTRELATIONTYPEID is null) then use the same object type for dest as for source
" else type2.OBJECT_TYPE end ) destObjectType, \n\
main.OBJECT_TYPE sourceObjectType, \n\
-- typeId of Object2\n\
case when main.SIDE = 1 then main.AB_OBJECTRELATIONTYPEID\n\