Re: [sqlalchemy] Many-to-Many association table with 3 foreign-key columns

2022-08-16 Thread Mike Bayer
There is no automatic or implied coordination against the survey_answer table as indicated in the "secondary" field. You need to not add entries to Survey.answers, Survey.questions as is, those would be viewonly=True as long as they refer to survey_answer as "secondary".Instead, create new

Re: [sqlalchemy] Reflecting a postgreSQL database with extensions?

2022-08-16 Thread Mike Bayer
they are safe to ignore. they might work if you install https://geoalchemy-2.readthedocs.io/en/latest/ if they include reflection support. you can also implement an event hook where you can provide for your own logic to supply a type object (but you'd need to have stub classes for those types,

[sqlalchemy] Many-to-Many association table with 3 foreign-key columns

2022-08-16 Thread Adderus Berg
Good afternoon community I have the following tables: - Survey - Answer - Question - SurveyAnswer (Association table) My association table has 3 foreign keys that relates to Answer, Question and Survey. A Survey has many Questions, many Answers. When I insert a survey object into t