<commit_before>Feature: Sub-queries
  In order to perform more advanced queries than allowed by GORM
  As a developer
  I want to query using scopes inside of other scopes as sub-queries
  
  Scenario: Query for instances where exists
    Given I have the following domain class:
      """
      class Customer {
        String name
      }
      """
    Given I have the following domain class:
      """
      class Account {
        String type
      }
      """
    And I have created the following "Customer" instances:
      | name    |
      | Bob     |
      | Elsie   |
    When I execute the code "Customer.where { exists( Account.where { } )}.all()"
    Then I should get the following results:
      | name    |
    And I have created the following "Account" instances:
      | type      |
      | Customer  |
    When I execute the code "Customer.where { exists( Account.where { } )}.all()"
    Then I should get the following results:
    | name    |
    | Bob     |
    | Elsie   |
    <commit_msg>Formatting change.<commit_after>Feature: Sub-queries
  In order to perform more advanced queries than allowed by GORM
  As a developer
  I want to query using scopes inside of other scopes as sub-queries
  
  Scenario: Query for instances where exists
    Given I have the following domain class:
      """
      class Customer {
        String name
      }
      """
    Given I have the following domain class:
      """
      class Account {
        String type
      }
      """
    And I have created the following "Customer" instances:
      | name    |
      | Bob     |
      | Elsie   |
    When I execute the code "Customer.where { exists( Account.where { } )}.all()"
    Then I should get the following results:
      | name    |
    And I have created the following "Account" instances:
      | type      |
      | Customer  |
    When I execute the code "Customer.where { exists( Account.where { } )}.all()"
    Then I should get the following results:
      | name    |
      | Bob     |
      | Elsie   |
    
{'fraction_non_alphanumeric': 0.07609229258713794, 'fraction_numerical': 0.0, 'mean_word_length': 1.9665211062590975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '87235', 'n_tokens_mistral': 547, 'n_tokens_neox': 542, 'n_words': 227}