title: How i can show all classes that a student isn't stay in adonis?
body: <p>I have three tables:</p>
  
  <h2><strong>students</strong></h2>
  
  <p>id INT <br>
  name VARCHAR</p>
  
  <h2><strong>class</strong></h2>
  
  <p>id INT <br>
  description VARCHAR</p>
  
  <h2><strong>student_classes</strong></h2>
  
  <p>id INT <br>
  student_id (FOREIGN KEY of students.id) <br>
  class_id (FOREIGN KEY of class.id)</p>
  
  <p>How i can return all classes of a student that is not in student_classes?
  I receive the <code>student_id</code> in <code>request.params.student_id</code>, i try something like:</p>
  
  <pre><code>async getAvailableClassesOfAStudent({ request }){
    const classes = await Database
      .query()
      .select('class.*')
      .from('class')
      .leftJoin('student_classes', 'class.id', 'student_classes.class_id')
      .whereNotIn('student_classes.student_id', request.params.student_id) 
  
    return classes 
  }
  </code></pre>
  
  <p>I'm getting:</p>
  
  <blockquote>
    <p>select "class".* from "class" left join "student_classes" on
    "class"."id" = "student_classes"."class_id" where
    "student_classes"."student_id" not in $1 - syntax error at or near
    "$1"</p>
  </blockquote>