database-relations

Relations on composite keys using sqlalchemy

Relations on composite keys using sqlalchemy Question: I have this simple model of Author – Books and can’t find a way to make firstName and lastName a composite key and use it in relation. Any ideas? from sqlalchemy import create_engine, ForeignKey, Column, String, Integer from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = …

Total answers: 1