I want to create entities in my bundle the are linked to users (for example - forum posts)
I'm not sure how to reference the user since different applications can use different user providers (for example - FOSUserBundle, or some other...)
At the moment all I need from the user is roles, and username.
What's the best way to achieve this?
- Code: Select all
/**
* @ManyToOne(targetEntity="???")
* @JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
Thanks in advance for your help!
