I have this activity_company table which includes an activity and company. I am trying to order the result of this query by modified_date and id. And in the activity table there is a boolean field such as shared. All the shared values are false in the database but after this query the resulted objects’ shared fields are displayed as true even if they are still false in the DB. Any idea what causes this situation ?
SELECT activity.* FROM activity INNER JOIN activity_company ON activity.id=activity_company.activity_id WHERE activity_company.company_id=1 ORDER BY activity.modified_date, activity.id