add relationship defs to models and oidpointer (untested)