--
You received this message because you are subscribed to the Google Groups "Spring Data Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cass...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/ff366c33-d1a0-4689-8317-216dcbea7cdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The @Query annotation accepts only pure CQL. It is not like JPA, or intended to be so. You must use table & column names.-matthew
On Mon, Mar 17, 2014 at 7:33 AM, Colin McQueen <colin....@shiftenergy.com> wrote:
Using the @Query annotation, do you use same syntax in CQL with the table and column names or is it like JPA where you can use your class and field names?
On Wednesday, March 5, 2014 4:11:51 PM UTC-4, Matthew Adams wrote:I just pushed the changes for DATACASS-107, which adds basic support for query methods on repositories.Named queries and @Query-annotated methods are supported. Queries derived from query method names are not yet supported.-matthew
--
You received this message because you are subscribed to the Google Groups "Spring Data Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cassandra+unsub...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/ff366c33-d1a0-4689-8317-216dcbea7cdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
java.lang.IllegalArgumentException: encountered unsupported query parameter types [class java.lang.Integer,int]
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cass...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/fc736d70-ffc9-4c65-8dd1-5b70528b0a9e%40googlegroups.com.
I don't think that'll work. You're binding an instance of Foo to ?1, but the positional parameter placeholders are intended to be for fields/properties.As for your use of TTL, I think we need a better way of supporting that. All of the generated repository interfaces delegate to CassandraTemplate, and I don't see any options in CassandraTemplate that let you specify TTL. Please enter an issue requesting that the insert* methods & repository save* methods include the capability of specifying TTL (and any other options that are appropriate).-matthew
On Tue, Mar 18, 2014 at 8:12 AM, Colin McQueen <colin....@shiftenergy.com> wrote:
Would this example work?@Query("INSERT INTO foo VALUES (?1) USING TTL ?2")Foo insertWithTimeToLive(final Foo entity, final int timeToLive);Basically the goal is to save all the data in the entity with an expiry time. I plan to write an update method as well and have a custom save method that will figure out if it should call the repository insert or update method.
On Monday, March 17, 2014 9:38:47 AM UTC-3, Matthew Adams wrote:
The @Query annotation accepts only pure CQL. It is not like JPA, or intended to be so. You must use table & column names.-matthew
On Mon, Mar 17, 2014 at 7:33 AM, Colin McQueen <colin....@shiftenergy.com> wrote:
Using the @Query annotation, do you use same syntax in CQL with the table and column names or is it like JPA where you can use your class and field names?
On Wednesday, March 5, 2014 4:11:51 PM UTC-4, Matthew Adams wrote:I just pushed the changes for DATACASS-107, which adds basic support for query methods on repositories.Named queries and @Query-annotated methods are supported. Queries derived from query method names are not yet supported.-matthew
--
You received this message because you are subscribed to the Google Groups "Spring Data Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cassandra+unsubscri...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/ff366c33-d1a0-4689-8317-216dcbea7cdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Spring Data Cassandra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spring-data-cassandra+unsub...@googlegroups.com.
To post to this group, send email to spring-dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/spring-data-cassandra.
To view this discussion on the web visit https://groups.google.com/d/msgid/spring-data-cassandra/fc736d70-ffc9-4c65-8dd1-5b70528b0a9e%40googlegroups.com.
--
@Query(SELECT * FROM foo WHERE p1 = :p1 AND p2 = :p2 AND p3 = :p3)
Set<Foo> findByPartitionKey(@Param("p1") final double p1, @Param("p2") final double p2, @Param("p3") final String p3);
com.datastax.driver.core.exceptions.InvalidQueryException: Invalid amount of bind variablesat com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35)at com.datastax.driver.core.ResultSetFuture.extractCauseFromExecutionException(ResultSetFuture.java:269)at com.datastax.driver.core.ResultSetFuture.getUninterruptibly(ResultSetFuture.java:183)at com.datastax.driver.core.Session.execute(Session.java:111)at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:519)at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:510)at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:487)at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:510)at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:499)at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:409)at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:436)at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:430)at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:122)at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:337)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at com.sun.proxy.$Proxy1408.findByPartitionKey(Unknown Source)