title: Cassandra UUID Query Problems
body: <p>Is the following possible in Cassandra? I'd like to get a list of all UUIDs from a table, but I keep getting errors. Here is the code in question: </p>
  
  <pre><code>@Query("SELECT id FROM table")
  public Result&lt;UUID&gt; getIds();
  </code></pre>
  
  <p>And here are the errors:</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Error preparing queries for accessor DeviceAccessor
      at com.datastax.driver.mapping.AccessorMapper.prepare(AccessorMapper.java:48)
      at com.datastax.driver.mapping.MappingManager.getAccessor(MappingManager.java:156)
      at com.datastax.driver.mapping.MappingManager.createAccessor(MappingManager.java:109)
      at com.tmp.whatever.persistence.DevicePersistenceHandler.init(DevicePersistenceHandler.java:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      ... 41 more
  Caused by: java.lang.RuntimeException: Cannot map return to class class com.datastax.driver.mapping.Result
      at com.datastax.driver.mapping.MethodMapper.mapType(MethodMapper.java:118)
      at com.datastax.driver.mapping.MethodMapper.prepare(MethodMapper.java:93)
      at com.datastax.driver.mapping.AccessorMapper.prepare(AccessorMapper.java:46)
      ... 51 more
  Caused by: java.lang.IllegalArgumentException: @Table annotation was not found on type java.util.UUID
      at com.datastax.driver.mapping.AnnotationParser.getTypeAnnotation(AnnotationParser.java:292)
      at com.datastax.driver.mapping.AnnotationParser.parseEntity(AnnotationParser.java:49)
      at com.datastax.driver.mapping.MappingManager.getMapper(MappingManager.java:119)
      at com.datastax.driver.mapping.MappingManager.mapper(MappingManager.java:76)
      at com.datastax.driver.mapping.MethodMapper.mapType(MethodMapper.java:116)
      ... 53 more
  </code></pre>
  
  <p>I am fairly new to Cassandra and this is my first attempt at a query without any training wheels, so there is a chance I missed something obvious. The Result class is from com.datastax.driver.mapping if it helps.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS devices (
    id uuid,
    name text,
    description text,
    device_type text,
    address text,
    port int,
    ssl boolean,
    credentials uuid,
    PRIMARY KEY (id)
  );
  </code></pre>