Why this schema is generating a relation n:m

前端 未结 1 538
感情败类
感情败类 2021-01-27 09:22

I\'ve this schema.yml file (just relevant part):

SdrivingMaquina:
  actAs: 
    Timestampable: ~
  columns:
    idmaquina: { type: integer(8), autoincrement: tru         


        
相关标签:
1条回答
  • 2021-01-27 09:35

    To have a one-to-one relation you should write

    SdrivingMaquina: { onDelete: CASCADE, local: idmaquina, foreign: idmaquina, type: one, foreignType: one }
    

    so add the foreignType: one parameter.

    0 讨论(0)
提交回复
热议问题