Re: Can we set TTL on individual fields (columns) using the Datastax java-driver

2016-02-08 Thread DuyHai Doan
I think you should direct your request to the java driver mailing list:
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user

To answer your question, no, there is no @Ttl annotation on the
driver-mapping module, even in the latest release:
https://github.com/datastax/java-driver/tree/3.0/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations

You'll need to handle the insertion with TTL yourself or look at other
object mappers


On Mon, Feb 8, 2016 at 8:27 PM, Ajay Garg  wrote:

> Something like ::
>
>
> ##
> class A {
>
>   @Id
>   @Column (name = "pojo_key")
>   int key;
>
>   @Ttl(10)
>   @Column (name = "pojo_temporary_guest")
>   String guest;
>
> }
> ##
>
>
> When I persist, let's say value "ajay" in guest-field
> (pojo_temporary_guest column), it stays forever, and does not become "null"
> after 10 seconds.
>
> Kindly point me what I am doing wrong.
> I will be grateful.
>
>
> Thanks and Regards,
> Ajay
>


Can we set TTL on individual fields (columns) using the Datastax java-driver

2016-02-08 Thread Ajay Garg
Something like ::


##
class A {

  @Id
  @Column (name = "pojo_key")
  int key;

  @Ttl(10)
  @Column (name = "pojo_temporary_guest")
  String guest;

}
##


When I persist, let's say value "ajay" in guest-field (pojo_temporary_guest
column), it stays forever, and does not become "null" after 10 seconds.

Kindly point me what I am doing wrong.
I will be grateful.


Thanks and Regards,
Ajay