How to union across multiple tables in SQLAlchemy?
问题 I have a few different notification tables, and I would like to perform a union across all of them to show the user all of their notifications. However, the union is not working as it should. Python code def _get_notifications_query(self, unconfirmed_only=True): ''' Return base query to return this users notifications. @param unconfirmed_only @return Query object ''' requests = ( DBSession.query(FriendshipRequestNotification) .outerjoin(UserFriendshipRequestNotification,