Reputation: 75
That is part of mapping info:
id:
type: integer
id: true
generator:
strategy: AUTO
ms_id:
type: string
unique: true
oneToOne:
parent:
targetEntity: Category
nullable: true
How do I establish a connection with ms_id instead of the id
Upvotes: 0
Views: 91
Reputation: 2285
You can specify the join column parameters with referencedColumnName, see the association mapping document
id:
type: integer
id: true
generator:
strategy: AUTO
ms_id:
type: string
unique: true
oneToOne:
parent:
targetEntity: Category
joinColumn:
name: category_id
referencedColumnName: ms_id
nullable: true
Upvotes: 1