matth
matth

Reputation: 33

Relationship between User with Symfony3 Doctrine

I'm a beginner on Symfony. I'm trying to create a friendship relation between users. I was wondering which possible ways I could use ? By now I created this : Implementing a friends relationship in Symfony3 with Doctrine

It works more as a follow function (like twitter) and I would like to find a way to create relationship like facebook.

I was thinking about an entity "invitation" with a minimum of fields: asking_date, status, accepting_date, blocked.

The problem is that I can't figured out the different associations to do between the entities?

Can somebody help me to go on the right track ? Thanks a lot.

Upvotes: 1

Views: 105

Answers (1)

Alvin Bunk
Alvin Bunk

Reputation: 7764

It is probably good to draw this out in a diagram so you can think about the relationships and how they might work. I'm not sure if you are already familiar with Entity Relationship Diagrams (ER diagrams), but here is a simple tutorial that will get you started.

You can also do a search on Google for more info. Get an ER Diagram drawn out and think about how those entities might work together. Doing the diagram first will help you find problems at the start, and will help figure out how you want the system to work.

Upvotes: 1

Related Questions