반응형 database2 Python - SQLAlchemy, pymysql 사용 SQLAlchemy는 Python에서 mysql등 데이터베이스를 질의할 때 유용하게 활용할 수 있는 옵션이다. https://docs.sqlalchemy.org/en/14/core/engines.html#mysql Engine Configuration — SQLAlchemy 1.4 Documentation Engine Configuration The Engine is the starting point for any SQLAlchemy application. It’s “home base” for the actual database and its DBAPI, delivered to the SQLAlchemy application through a connection pool and a Dialect, whi.. 2022. 5. 12. .Net - EF 'Entity type 'xxx' has composite primary key defined with data annotations. To set composite primary key, use fluent API.' 금일 Database 의 PK(Primary Key)를 2개 지정하여 사용하다가 이와 같은 오류를 마주하였다. 이 오류는 .Net Entity Framework에서 Primary Key 2개가 실제 EF에서 적절하게 매핑이 되지 않아서 발생한다. 아래 그림과 같이 Data Model에 2개의 키를 지정해 준 상황에 발생하는 오류라고 할 수 있다. [Key] [Required] public string testkey { get; set; } public string version { get; set; } public string type { get; set; } [Key] [Required] public string realkey { get; set; } 따라서 Entity 생성 시점에 PK가 2개임을 알.. 2020. 11. 26. 이전 1 다음 반응형