Get Foreign Key Value

后端 未结 1 770
不知归路
不知归路 2021-01-03 08:09

How can I get the foreign key values? I have a common vehicle model that links to the year, series, engine type, body style, transmission and drive train...all as foreign k

相关标签:
1条回答
  • 2021-01-03 08:51

    You need the actual IDs? Try something like my_vehicle_ref.series.id.

    Also, I hope you know that the series attribute right there is really an instance of Series, so you could access any of it's properties, e.g., my_vehicle_ref.series.model.model.

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