You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am trying to save few documents in a transaction. Entity of the document is annotated with @Durability(MAJORITY_AND_PERSIST_TO_ACTIVE). Transaction fails with Transaction has failed with cause 'java.lang.IllegalArgumentException: withDurability is not supported in a transaction'
Is this intended? Probably has something to do with this comment #1487 (comment)
// edit
ok, I can clearly see now that this is intentional. Could you please share why? I wanted to achieve this scenario - annotate entity with @Durability. Have repository with reference to CrudRepository with durable save methods and other @Transactional method that does some operations
The text was updated successfully, but these errors were encountered:
In spring data couchbase, you would specify it by overriding the configureEnvironment() method of you implementation of AbstractCouchbaseConfiguration.
@Override
public void configureEnvironment(ClusterEnvironment.Builder builder) {
builder.transactionsConfig(
com.couchbase.client.java.transactions.config.TransactionsConfig.builder().durabilityLevel(DurabilityLevel.MAJORITY_AND_PERSIST_TO_ACTIVE));
}
Hey, I am trying to save few documents in a transaction. Entity of the document is annotated with
@Durability(MAJORITY_AND_PERSIST_TO_ACTIVE)
. Transaction fails withTransaction has failed with cause 'java.lang.IllegalArgumentException: withDurability is not supported in a transaction'
Is this intended? Probably has something to do with this comment #1487 (comment)
tagging @programmatix
// edit
ok, I can clearly see now that this is intentional. Could you please share why? I wanted to achieve this scenario - annotate entity with
@Durability
. Have repository with reference to CrudRepository with durable save methods and other@Transactional
method that does some operationsThe text was updated successfully, but these errors were encountered: