title: How to retrieve object members in @Query Annotation
body: <p>I have a basic entity and I want to create a query that would retrieve this entity's members. Here is the entity:</p>
  
  <pre><code>public class TestEntity implements Serializable {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
      private String name;
      private String author;
  
      @Column(insertable=false)
      private String db_id;
  }
  </code></pre>
  
  <p>And my test repository in which I try to create the query.</p>
  
  <pre><code>@Repository
  @Transactional
  public interface TestRepository extends JpaRepository&lt;TestEntity, Long&gt; {
      @Query("INSERT INTO TestEntity VALUES (:object.id, :object.name :object.author)")
      void insertSynchronizedColumns(TestEntity object);
  }
  </code></pre>
  
  <p>This currently throws error:</p>
  
  <pre><code>antlr.MismatchedTokenException: expecting OPEN, found 'VALUES'
  </code></pre>
  
  <p>As a function argument I need the <code>object</code> and not the specific column names. Is there a way to retrieve <code>object</code>'s <code>id</code> and other fields? </p>