Django - models & table columns in DataGrip not matching

Hello,

I’m really curious as to why the OrderItem model in store/models.py contains 2 fields named order and product but they are represented in DataGrip as order_id & product_id. This really confused me when working on the filtering across relationships. Could you please explain what is going on here? Were the column names overwritten when I performed the insert statement in DataGrip? (although that wouldn’t make sense, in ssms this would have thrown an err not sure if it’s allowed in MySQL).

I really hope you get around to seeing this. I am a new student of yours and tho I have some understanding or filtering across relationships this one really stumped me and I’d really like to understanding the why behind it.

Quick note: i’ve done some digging on my own before asking, as i’ve done with all errors i’ve gotten before getting to this point in the course (that mysqlclient install err was a real pain haha).

Thank you so much!

Jean