title: Querying with ManyToOne association results in SQLException
body: <p>I am trying out a simple use case for many-to-one association with Spring Data JPA but it is resulting in an SQLException.</p>
  <p>Model is of typical Order and OrderItem classes.</p>
  <p><strong>Order</strong></p>
  <pre><code>@Entity
  public class Order {
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Long id;
  
  private String name;
  
  public Long getId() {
      return id;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  }
  </code></pre>
  <p><strong>OrderItem</strong></p>
  <pre><code>@Entity
  public class OrderItem {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Long id;
  
  private String name;
  
  @ManyToOne
  @JoinColumn(name = &quot;fk_order&quot;)
  private Order order;
  
  public Long getId() {
      return id;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public Order getOrder() {
      return order;
  }
  
  public void setOrder(Order order) {
      this.order = order;
  }
  }
  </code></pre>
  <p>Unit test</p>
  <pre><code>@SpringBootTest
  public class MappingTests {
  
      @Autowired
      private OrderRepository orderRepository;
  
      @Autowired
      private OrderItemRepository orderItemRepository;
  
      @Test
      @Transactional
      @Disabled
      public void testManyToOneUnidirectional() {
          Order order = new Order();
          order.setName(&quot;order-01&quot;);
          orderRepository.save(order);
  
          OrderItem orderItem = new OrderItem();
          orderItem.setName(&quot;item-01&quot;);
          orderItem.setOrder(order);
          orderItemRepository.save(orderItem);
  
  //        List&lt;OrderItem&gt; all = orderItemRepository.findAll();
      }
  </code></pre>
  <p>Unit test passes. But if I uncomment the line to find all items from <code>OrderItemRepository</code> it fails with following exception:</p>
  <pre><code>2020-11-17 11:37:07.671  WARN 35823 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 42001, SQLState: 42001
  2020-11-17 11:37:07.671 ERROR 35823 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : Syntax error in SQL statement &quot;INSERT INTO ORDER[*] (NAME, ID) VALUES (?, ?)&quot;; expected &quot;identifier&quot;; SQL statement:
  insert into order (name, id) values (?, ?) [42001-200]
  2020-11-17 11:37:07.685  INFO 35823 --- [           main] o.s.t.c.transaction.TransactionContext   : Rolled back transaction for test: [DefaultTestContext@6c61a903 testClass = MappingTests, testInstance = com.example.jpademo.MappingTests@5408d4b3, testMethod = testManyToOneUnidirectional@MappingTests, testException = org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [insert into order (name, id) values (?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement, mergedContextConfiguration = [WebMergedContextConfiguration@658c5a19 testClass = MappingTests, locations = '{}', classes = '{class com.example.jpademo.JpaDemoApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@66d18979, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@17f7cd29, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@7ee8290b, org.springframework.boot.test.web.reactive.server.WebTestClientContextCustomizer@2e377400, org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@e4487af, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@683dbc2c, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@233c0b17], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -&gt; true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -&gt; true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -&gt; true]]
  
  
  org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [insert into order (name, id) values (?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement
  
      at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
  </code></pre>
  <p>What could be missing here ?
  Thanks.</p>