No, i can’t in table OD_STOCK there is no column GD_CODETYPE (or STOCKGROUP), just GD_CODEID. But the PK in the other table are both columns.
STOCKGROUP is the value that should have GD_CODETYPE in the referenced table GD_CODE
I can’t change the DB structure.