one-to-many and many-to-one relationships mostly working