phantom
                                
                                 phantom copied to clipboard
                                
                                    phantom copied to clipboard
                            
                            
                            
                        How can I Insert a date of type Instant in cassandra database with phantom ?
I want to insert a value of type Instant in db cassandra with phantom . I have the time:
import java.util.Instant
val time = Instant.now()
2020-12-02T15:40:55.197408Z
I found in db the value : 2020-12-02T15:40:55.197Z
why the value change in cassandra? is it possible to insert the same created value?
If you can't represent your Instant in the exact way you want using standard datetimes etc then it's pretty doable to define a custom function for serializing to some other representation (e.g String/Bytes) and then override the "fromRow" function in your Table definition so you can read a row of data back into your application as whatever data type you have.