Rolled back some changes, added Relationships

We need to roll back some changes I introduced. Some of the relations wordpress has cannot be mapped directly in doctrine. So using integer fields instead was totally correct before.