4👍
✅
You need a definition on each side only if you want to access it from both sides. I.e if you only want to be able to call campaign.user.single()
from your campaign objects but don’t care about accessing a users campaigns then you dont need a definition on a your User class.
Generally I find it best to define a relationship on both sides as its easier for someone new to your schema to understand its structure. Both definitions should be of the same type, so OWNS_BY would return a different set of relationships. The naming of these types is totally up to you however uppercase seems to be the convention,
Hope this helps, feel free to message me on github if you have any further questions,
Cheers,
Rob
👤rob
Source:stackexchange.com