I am writing a Flask webapp and having a hard time with SQLAlchemy. I am very new to SQLAlchemy and Flask.
I have following three tables.
User:
[
user_id
first_name
last_name
]
Picture:
[
filename
picture_type // eg: painting, photograph
painter
]
Comment
[
user_id
filename
comment
]
I am trying to query all filenames that was not reviewed by current user. So the condition would be "all filenames from the picture table with matching picture type where each filename should not have matching, in Comment table, filename and matching user_id with the current user
Currently the current user user_id an picture_type information are available as incoming argument to the function I am trying to write.
How should I write the query using session filter query?