Comments (6)
BeforeSaveCallback
is called after transforming the object into a Statement
(that's also why you get the Statement
object). Before save is useful if you want to save a certain state to the database but you want to render a different object state after the save.
What you're looking for is ReactiveBeforeConvertCallback
.
Looking at the documentation, the docs of events and callbacks could be a bit more descriptive and so I'm converting this ticket into a documentation ticket.
from spring-data-cassandra.
Thanks for the quick response. Changing ReactiveBeforeSaveCallback to ReactiveBeforeConvertCallback worked for me.
from spring-data-cassandra.
why is ReactiveAfterConvertCallback or afterLoadCallback not available? I am able to transform the entity before persisting using ReactiveBeforeConvertCallback but I have to transform again after reading from the database.
Should I be using a different interface?
from spring-data-cassandra.
ReactiveAfterConvertCallback
isn't available as the entity row mapper doesn't expose a reactive mapping interface. Also, bulk-loading entities and creating Mono
's creates a lot of GC pressure so we initially didn't want to expose a reactive AfterLoad
/AfterConvert
callback.
from spring-data-cassandra.
I see. Initially, I implemented PropertyValueConverter and added @ValueConverter to a property before persisting. But that is also not getting invoked.
I understand @ValueConverter is part of spring data and I am using Spring data reactive cassandra.
@table("tablename")
public class TestTableClass{
@ValueConverter(..class)
from spring-data-cassandra.
Thanks for bringing @ValueConverter
up. It isn't supported yet and I created #1449 to keep track of the progress.
from spring-data-cassandra.
Related Issues (20)
- Add support for property `@ValueConverter`
- Reactive batch operation fails when ttl is set HOT 3
- Release 4.1.7 (2023.0.7)
- Release 4.2.1 (2023.1.1)
- Release 4.3 M1 (2024.0.0)
- Introduce property for Jenkins user and Artifactory server details
- Adopt `CassandraParameters` and `CassandraParameter` to reflect the actual parameter type when using generics
- Upgrade to Maven Wrapper 3.9.6
- Upgrade to Maven Wrapper 3.9.6
- Upgrade to Maven Wrapper 3.9.6
- Release 4.1.8 (2023.0.8)
- Release 4.2.2 (2023.1.2)
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Extend license header copyright years to 2024
- Datastax java-driver maven coordinates have changed HOT 1
- Release 4.1.9 (2023.0.9)
- Release 4.2.3 (2023.1.3)
- Constructor with `@Column`-annotated arguments leads to memory leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-cassandra.