updated mogenerator to support non-optional, non-transient relationships