--Adding resource when mediator is a foriegn key gives a problem. It is fixed