Sqlaclchemy orm correlation to real definitions in mysql db

Viewed 15

I've a general question in which:
1.Mysql table db has a table name A with colums a1, a2, a3
2. Primary key defined to a1 (mysql)
3. sqlalchemy orm definition for some reason defines the composite primary key of a1,a2.

Who wins the primary key definition when using through sqlalchemy ORM?

Same question for the opposite case mysql defined composite pm key a1, a2; sqlalchemy just a1 as primary key.

0 Answers
Related