title: Check if specific record exists in one to many tables
body: <p>I have two tables with one-to-many relation with such structure:  </p>
  
  <pre><code>meeting              meeting_person
  +--+------------+    +--+----------+-----------+---------+
  |id|meeting_type|    |id|meeting_id|person_type|person_id|
  +--+------------+    +--+----------+-----------+---------+
  |1 |          1 |    |1 |         1|          1|     100 |
  |2 |          2 |    |2 |         1|          1|     101 |
  +--+------------+    |3 |         1|          2|     102 |
                       |4 |         2|          3|     103 |
                       +--+----------+-----------+---------+
  </code></pre>
  
  <p>What I want to do is check whether the specific record exists before inserting, and if so warn user about it.<br>
  The thing is I need to check whether a meeting with such <code>meeting_type</code> and <code>person_id</code> with <code>person_type</code> exists, and that for all persons.<br>
  For example, if with given data I wanted to insert meeting with meeting_type = 1 and such meeting_persons:  </p>
  
  <ul>
  <li>person_type = 1 and person_id = 100</li>
  <li>person_type = 1 and person_id = 101</li>
  <li>person_type = 2 and person_id = 102<br>
  then user should see warning.<br>
  But if I wanted to insert meeting with meeting_type = 1 and such meeting_persons:  </li>
  <li>person_type = 1 and person_id = 100<br>
  then user should not see warning and records should be inserted.<br>
  I just cannot think of way, how to check this.</li>
  </ul>