I am using spring-data-cassandra module.
I have an annotated bean using the @Table annotation and a primary class using the @PrimaryKeyClass
the primary key class has 5 primary key columns (2 partitioned and 3 clustered). 2 of my columns has the name property i.e.:
@PrimaryKeyColumn(name="correlated_type", ordinal = 2, type= PrimaryKeyType.CLUSTERED)
private String correlatedType;
When using the CassandraTemplate insert operation everything is working fine but when i am using the cassandraTemplate.deleteAsynchronously(List<entities> list)
the columns name are not parsed using the name property but maintain the field name (correlatedType instead of correlated_type).
i tried using a regular delete operation for a single object and tried to use the forceQuote = true property both didn't help.
insert log sample:
[o.s.cassandra.core.CqlTemplate] asynchronously executing [INSERT INTO identity_correlations(type,value,"**correlated_type**",ts,"**correlated_value**",extra) VALUES ('Participant','p5','Visitor',4,'R3',{'v':'1','labels':'b,c'}) USING TTL 34128000;
delete log sample:
[o.s.cassandra.core.CqlTemplate] asynchronously executing [BEGIN BATCH DELETE FROM identity_correlations WHERE **correlatedValue**='p5' AND **correlatedType**='Participant' AND type='Visit' AND value='v1' AND ts=1;DELETE FROM identity_correlations WHERE correlatedValue='R3' AND correlatedType='Visitor' AND type='Participant' AND value='p5' AND ts=4;DELETE FROM identity_correlations WHERE correlatedValue='R3' AND correlatedType='Visitor' AND type='Participant' AND value='p5' AND ts=3;APPLY BATCH;]
did anyone encounter this problem before?
--
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/51cb7159-dbc5-4fd6-8f30-2254c3736ca3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Please enter an issue for this. It'd be even better if you can fork the repo, create a failing test case that reproduces this problem, then send a pull request.I'll have a look as soon as I have time.-matthew
On Tue, Jul 22, 2014 at 8:12 AM, Barak Cohen <bar...@liveperson.com> wrote:
I am using spring-data-cassandra module.
I have an annotated bean using the @Table annotation and a primary class using the
@PrimaryKeyClass
the primary key class has 5 primary key columns (2 partitioned and 3 clustered). 2 of my columns has the name property i.e.:
@PrimaryKeyColumn(name="correlated_type", ordinal = 2, type= PrimaryKeyType.CLUSTERED) private String correlatedType;
When using the CassandraTemplate insert operation everything is working fine but when i am using the
cassandraTemplate.deleteAsynchronously(List<entities> list)
the columns name are not parsed using the name property but maintain the field name (correlatedType instead of correlated_type).i tried using a regular delete operation for a single object and tried to use the forceQuote = true property both didn't help.
insert log sample: [o.s.cassandra.core.CqlTemplate] asynchronously executing [INSERT INTO identity_correlations(type,value,"**correlated_type**",ts,"**correlated_value**",extra) VALUES ('Participant','p5','Visitor',4,'R3',{'v':'1','labels':'b,c'}) USING TTL 34128000; delete log sample: [o.s.cassandra.core.CqlTemplate] asynchronously executing [BEGIN BATCH DELETE FROM identity_correlations WHERE **correlatedValue**='p5' AND **correlatedType**='Participant' AND type='Visit' AND value='v1' AND ts=1;DELETE FROM identity_correlations WHERE correlatedValue='R3' AND correlatedType='Visitor' AND type='Participant' AND value='p5' AND ts=4;DELETE FROM identity_correlations WHERE correlatedValue='R3' AND correlatedType='Visitor' AND type='Participant' AND value='p5' AND ts=3;APPLY BATCH;]
did anyone encounter this problem before?
This message may contain confidential and/or privileged information.If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.
--
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/51cb7159-dbc5-4fd6-8f30-2254c3736ca3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/51cb7159-dbc5-4fd6-8f30-2254c3736ca3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This message may contain confidential and/or privileged information.If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.