I trying to load an Object with manyToOne
, but become null
.
#ConversationMessage.orm.yml:
AppBundle\Entity\ConversationMessage:
type: entity
manyToOne:
user:
targetEntity: User
joinColumn:
name: user
referencedColumnName: id
conversation:
targetEntity: Conversation
joinColumn:
name: conversation
referencedColumnName: id
table: null
repositoryClass: AppBundle\Repository\ConversationMessageRepository
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
message:
type: text
time:
type: integer
lifecycleCallbacks: { }
The conversation is always set to database entry. But User object not. Are both classes the same?
The User object only appears in the ConversionMessage if it is the User self. All objects, the userID isn't my logged in userID, the entry isn't initialized.
I have tried to set fetch method to EAGER
, but the same result.
Can someone Help?
Thank!